diff options
author | Tsutomu Itoh <t-itoh@jp.fujitsu.com> | 2013-02-27 11:31:54 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-02-27 16:42:08 +0100 |
commit | b7b27b4efb0eb599f89ea664c3acb216876f00fd (patch) | |
tree | ddc9485f5296f591936fcf73d08adefdee8dfd13 /cmds-check.c | |
parent | e929e2947a52bedc91b674202ebff8a4cc21b794 (diff) |
Btrfs-progs: fix segmentation fault of "btrfs check"
Segmentation fault occurred in the following command.
# btrfs check /dev/sdc7
No valid Btrfs found on /dev/sdc7
Segmentation fault (core dumped)
Fix it.
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Diffstat (limited to 'cmds-check.c')
-rw-r--r-- | cmds-check.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmds-check.c b/cmds-check.c index d63e945c..5d2e9edf 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -3610,12 +3610,12 @@ int cmd_check(int argc, char **argv) } info = open_ctree_fs_info(argv[optind], bytenr, rw, 1); - uuid_unparse(info->super_copy.fsid, uuidbuf); - printf("Checking filesystem on %s\nUUID: %s\n", argv[optind], uuidbuf); - if (info == NULL) return 1; + uuid_unparse(info->super_copy.fsid, uuidbuf); + printf("Checking filesystem on %s\nUUID: %s\n", argv[optind], uuidbuf); + if (!extent_buffer_uptodate(info->tree_root->node) || !extent_buffer_uptodate(info->dev_root->node) || !extent_buffer_uptodate(info->extent_root->node) || |