aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/relocation.c
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2011-10-03 23:22:41 -0400
committerDavid Sterba <dsterba@suse.cz>2012-03-22 01:45:36 +0100
commit2c536799f1bde905bbacf7af3aa6be3f4de66005 (patch)
tree54f306bf4320d97e73f9728268a99910b234d048 /fs/btrfs/relocation.c
parentbtrfs: split extent_state ops (diff)
downloadlinux-dev-2c536799f1bde905bbacf7af3aa6be3f4de66005.tar.xz
linux-dev-2c536799f1bde905bbacf7af3aa6be3f4de66005.zip
btrfs: btrfs_drop_snapshot should return int
Commit cb1b69f4 (Btrfs: forced readonly when btrfs_drop_snapshot() fails) made btrfs_drop_snapshot return void because there were no callers checking the return value. That is the wrong order to handle error propogation since the caller will have no idea that an error has occured and continue on as if nothing went wrong. Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r--fs/btrfs/relocation.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 5e89a5ea692f..a87678ead611 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -2272,7 +2272,8 @@ again:
} else {
list_del_init(&reloc_root->root_list);
}
- btrfs_drop_snapshot(reloc_root, rc->block_rsv, 0, 1);
+ ret = btrfs_drop_snapshot(reloc_root, rc->block_rsv, 0, 1);
+ BUG_ON(ret < 0);
}
if (found) {