summaryrefslogtreecommitdiff
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2017-12-04 07:54:52 +0300
committerDavid Sterba <dsterba@suse.com>2018-01-22 18:08:15 +0300
commitebbede42d47dc77d1c20e7468418826e5efa6b29 (patch)
tree21765212b290a2704ffe2dd0f4a9b8ec80f0c04f /fs/btrfs/ioctl.c
parent3c958bd23b60c22947b857d2cb13196e2cc58c58 (diff)
downloadlinux-ebbede42d47dc77d1c20e7468418826e5efa6b29.tar.xz
btrfs: cleanup device states define BTRFS_DEV_STATE_WRITEABLE
Currently device state is being managed by each individual int variable such as struct btrfs_device::writeable. Instead of that declare device state BTRFS_DEV_STATE_WRITEABLE and use the bit operations. Signed-off-by: Anand Jain <anand.jain@oracle.com> [ whitespace adjustments ] Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index e7f37c46d6a9..8c75e555e3f8 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1503,7 +1503,7 @@ static noinline int btrfs_ioctl_resize(struct file *file,
goto out_free;
}
- if (!device->writeable) {
+ if (!test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state)) {
btrfs_info(fs_info,
"resizer unable to apply on readonly device %llu",
devid);