Commit b89311ef authored by Gu Jinxiang's avatar Gu Jinxiang Committed by David Sterba

btrfs: propagate failures of __exclude_logged_extent to upper caller

Function btrfs_exclude_logged_extents may call __exclude_logged_extent
which may fail.
Propagate the failures of __exclude_logged_extent to upper caller.
Signed-off-by: default avatarGu Jinxiang <gujx@cn.fujitsu.com>
Reviewed-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent d4b20733
...@@ -6457,6 +6457,7 @@ int btrfs_exclude_logged_extents(struct btrfs_fs_info *fs_info, ...@@ -6457,6 +6457,7 @@ int btrfs_exclude_logged_extents(struct btrfs_fs_info *fs_info,
struct btrfs_key key; struct btrfs_key key;
int found_type; int found_type;
int i; int i;
int ret = 0;
if (!btrfs_fs_incompat(fs_info, MIXED_GROUPS)) if (!btrfs_fs_incompat(fs_info, MIXED_GROUPS))
return 0; return 0;
...@@ -6473,10 +6474,12 @@ int btrfs_exclude_logged_extents(struct btrfs_fs_info *fs_info, ...@@ -6473,10 +6474,12 @@ int btrfs_exclude_logged_extents(struct btrfs_fs_info *fs_info,
continue; continue;
key.objectid = btrfs_file_extent_disk_bytenr(eb, item); key.objectid = btrfs_file_extent_disk_bytenr(eb, item);
key.offset = btrfs_file_extent_disk_num_bytes(eb, item); key.offset = btrfs_file_extent_disk_num_bytes(eb, item);
__exclude_logged_extent(fs_info, key.objectid, key.offset); ret = __exclude_logged_extent(fs_info, key.objectid, key.offset);
if (ret)
break;
} }
return 0; return ret;
} }
static void static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment