From 27cdeb7096b86f05ad018a24cdb63acdf0850a5d Mon Sep 17 00:00:00 2001 From: Miao Xie Date: Wed, 2 Apr 2014 19:51:05 +0800 Subject: Btrfs: use bitfield instead of integer data type for the some variants in btrfs_root Signed-off-by: Miao Xie Signed-off-by: Wang Shilong Signed-off-by: Chris Mason --- fs/btrfs/file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'fs/btrfs/file.c') diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 3029925..5c6947d 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -714,7 +714,7 @@ int __btrfs_drop_extents(struct btrfs_trans_handle *trans, int recow; int ret; int modify_tree = -1; - int update_refs = (root->ref_cows || root == root->fs_info->tree_root); + int update_refs; int found = 0; int leafs_visited = 0; @@ -724,6 +724,8 @@ int __btrfs_drop_extents(struct btrfs_trans_handle *trans, if (start >= BTRFS_I(inode)->disk_i_size && !replace_extent) modify_tree = 0; + update_refs = (test_bit(BTRFS_ROOT_REF_COWS, &root->state) || + root == root->fs_info->tree_root); while (1) { recow = 0; ret = btrfs_lookup_file_extent(trans, root, path, ino, -- cgit v1.1