diff options
author | Anand Jain <anand.jain@oracle.com> | 2017-12-04 05:54:54 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-01-22 16:08:15 +0100 |
commit | e6e674bd4d54fe8d47a06914f3b90752785b4882 (patch) | |
tree | e310b1c74e52de8b03ebd48804ae262820fc6216 /fs/btrfs/super.c | |
parent | btrfs: cleanup device states define BTRFS_DEV_STATE_IN_FS_METADATA (diff) | |
download | linux-e6e674bd4d54fe8d47a06914f3b90752785b4882.tar.xz linux-e6e674bd4d54fe8d47a06914f3b90752785b4882.zip |
btrfs: cleanup device states define BTRFS_DEV_STATE_MISSING
Currently device state is being managed by each individual int
variable such as struct btrfs_device::missing. Instead of that
declare btrfs_device::dev_state BTRFS_DEV_STATE_MISSING and use
the bit operations.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by : Nikolay Borisov <nborisov@suse.com>
[ whitespace adjustments ]
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index bc55c5e6badd..ba5324523995 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -2270,7 +2270,7 @@ static int btrfs_show_devname(struct seq_file *m, struct dentry *root) while (cur_devices) { head = &cur_devices->devices; list_for_each_entry(dev, head, dev_list) { - if (dev->missing) + if (test_bit(BTRFS_DEV_STATE_MISSING, &dev->dev_state)) continue; if (!dev->name) continue; |