diff options
author | Josef Bacik <josef@toxicpanda.com> | 2020-09-02 00:40:37 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-10-07 13:13:19 +0300 |
commit | 72804905001267a93e7a470430c2bcc122932ca6 (patch) | |
tree | b06e8a21b3ea0c237b660278759d0cee80d1ad89 /fs/btrfs/super.c | |
parent | 7269ddd2f60286af1f5d1d47d283d2f9a26818c6 (diff) | |
download | linux-72804905001267a93e7a470430c2bcc122932ca6.tar.xz |
btrfs: kill the RCU protection for fs_info->space_info
We have this thing wrapped in an RCU lock, but it's really not needed.
We create all the space_info's on mount, and we destroy them on unmount.
The list never changes and we're protected from messing with it by the
normal mount/umount path, so kill the RCU stuff around it.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 3ebe7240c63d..8840a4fa81eb 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -2164,8 +2164,7 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf) u64 thresh = 0; int mixed = 0; - rcu_read_lock(); - list_for_each_entry_rcu(found, &fs_info->space_info, list) { + list_for_each_entry(found, &fs_info->space_info, list) { if (found->flags & BTRFS_BLOCK_GROUP_DATA) { int i; @@ -2194,8 +2193,6 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf) total_used += found->disk_used; } - rcu_read_unlock(); - buf->f_blocks = div_u64(btrfs_super_total_bytes(disk_super), factor); buf->f_blocks >>= bits; buf->f_bfree = buf->f_blocks - (div_u64(total_used, factor) >> bits); |