diff options
author | David Sterba <dsterba@suse.com> | 2017-02-13 16:07:02 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-02-17 14:03:50 +0300 |
commit | 9ea6e2b54847a08da87c118e6a197f27eb9b0159 (patch) | |
tree | b61f91307e3a36f68523e058ce76e3e6964a2a7f /fs/btrfs/transaction.c | |
parent | 81353d50f5274e435105391b669e05aaf62c8609 (diff) | |
download | linux-9ea6e2b54847a08da87c118e6a197f27eb9b0159.tar.xz |
btrfs: remove unnecessary mutex lock in qgroup_account_snapshot
The quota status used to be tracked as a variable, so the mutex was
needed (until "Btrfs: add a flags field to btrfs_fs_info" afcdd129e05a9).
Since the status is a bit modified atomically and we don't hold the
mutex beyond the check, we can drop it.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 48aabb367f73..5eefd77bafc7 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1364,12 +1364,8 @@ static int qgroup_account_snapshot(struct btrfs_trans_handle *trans, * enabled. If this check races with the ioctl, rescan will * kick in anyway. */ - mutex_lock(&fs_info->qgroup_ioctl_lock); - if (!test_bit(BTRFS_FS_QUOTA_ENABLED, &fs_info->flags)) { - mutex_unlock(&fs_info->qgroup_ioctl_lock); + if (!test_bit(BTRFS_FS_QUOTA_ENABLED, &fs_info->flags)) return 0; - } - mutex_unlock(&fs_info->qgroup_ioctl_lock); /* * We are going to commit transaction, see btrfs_commit_transaction() |