summaryrefslogtreecommitdiff
path: root/fs/btrfs/relocation.c
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2011-10-04 03:22:41 (GMT)
committerDavid Sterba <dsterba@suse.cz>2012-03-22 00:45:36 (GMT)
commit2c536799f1bde905bbacf7af3aa6be3f4de66005 (patch)
tree54f306bf4320d97e73f9728268a99910b234d048 /fs/btrfs/relocation.c
parent3fbe5c02ae5a59053d779392b9a12aa8f6d6198e (diff)
downloadlinux-fsl-qoriq-2c536799f1bde905bbacf7af3aa6be3f4de66005.tar.xz
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 5e89a5e..a87678e 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) {