diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2014-04-02 07:51:05 -0400 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-06-09 20:20:40 -0400 |
commit | 27cdeb7096b86f05ad018a24cdb63acdf0850a5d (patch) | |
tree | 1e795214fd0456f83c85843bea354d7331328bd1 /fs/btrfs/ioctl.c | |
parent | f959492fc15b60d874a9cbf55ae4760f2ef261ed (diff) |
Btrfs: use bitfield instead of integer data type for the some variants in btrfs_root
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index ebac486f59af..242a37cd26b2 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -638,7 +638,7 @@ static int create_snapshot(struct btrfs_root *root, struct inode *dir, | |||
638 | struct btrfs_trans_handle *trans; | 638 | struct btrfs_trans_handle *trans; |
639 | int ret; | 639 | int ret; |
640 | 640 | ||
641 | if (!root->ref_cows) | 641 | if (!test_bit(BTRFS_ROOT_REF_COWS, &root->state)) |
642 | return -EINVAL; | 642 | return -EINVAL; |
643 | 643 | ||
644 | atomic_inc(&root->will_be_snapshoted); | 644 | atomic_inc(&root->will_be_snapshoted); |
@@ -2369,7 +2369,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, | |||
2369 | dest->root_item.drop_level = 0; | 2369 | dest->root_item.drop_level = 0; |
2370 | btrfs_set_root_refs(&dest->root_item, 0); | 2370 | btrfs_set_root_refs(&dest->root_item, 0); |
2371 | 2371 | ||
2372 | if (!xchg(&dest->orphan_item_inserted, 1)) { | 2372 | if (!test_and_set_bit(BTRFS_ROOT_ORPHAN_ITEM_INSERTED, &dest->state)) { |
2373 | ret = btrfs_insert_orphan_item(trans, | 2373 | ret = btrfs_insert_orphan_item(trans, |
2374 | root->fs_info->tree_root, | 2374 | root->fs_info->tree_root, |
2375 | dest->root_key.objectid); | 2375 | dest->root_key.objectid); |