summaryrefslogtreecommitdiff
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2013-03-11 09:20:00 +0000
committerChris Mason <chris.mason@fusionio.com>2013-03-21 19:24:31 -0400
commitd763448286377b8a0e3f179372e9e292bef3c337 (patch)
tree1c0dad16a83e986a6550e14c1fae48fbf9f47f3c /fs/btrfs/disk-io.c
parent3b2775942d6ccb14342f3aae55f22fbbfea8db14 (diff)
downloadlwn-d763448286377b8a0e3f179372e9e292bef3c337.tar.gz
lwn-d763448286377b8a0e3f179372e9e292bef3c337.zip
Btrfs: update to use fs_state bit
Now that we use bit operation to check fs_state, update btrfs_free_fs_root()'s checker, otherwise we get back to memory leak case. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 7d84651e850b..127b23e8323b 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3253,7 +3253,7 @@ void btrfs_free_fs_root(struct btrfs_fs_info *fs_info, struct btrfs_root *root)
if (btrfs_root_refs(&root->root_item) == 0)
synchronize_srcu(&fs_info->subvol_srcu);
- if (fs_info->fs_state & BTRFS_SUPER_FLAG_ERROR) {
+ if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state)) {
btrfs_free_log(NULL, root);
btrfs_free_log_root_tree(NULL, fs_info);
}