diff options
| author | 2025-07-01 15:25:14 +0100 | |
|---|---|---|
| committer | 2025-07-22 00:07:37 +0200 | |
| commit | a943812bfffb38e6b416ee359d3db1f6974c5dfe (patch) | |
| tree | 7175afbd1d4c52dbc0c26aa2aace7a6acb6bd9e8 /fs/btrfs/tree-log.c | |
| parent | btrfs: qgroup: fix qgroup create ioctl returning success after quotas disabled (diff) | |
| download | wireguard-linux-a943812bfffb38e6b416ee359d3db1f6974c5dfe.tar.xz wireguard-linux-a943812bfffb38e6b416ee359d3db1f6974c5dfe.zip | |
btrfs: qgroup: use btrfs_qgroup_enabled() in ioctls
We have a publicly exported btrfs_qgroup_enabled() and an ioctl.c private
qgroup_enabled() helper. Both of these test if qgroups are enabled, the
first check if the flag BTRFS_FS_QUOTA_ENABLED is set in fs_info->flags
while the second checks if fs_info->quota_root is not NULL while holding
the mutex fs_info->qgroup_ioctl_lock.
We can get away with the private ioctl.c:qgroup_enabled(), as all entry
points into the qgroup code check if fs_info->quota_root is NULL or not
while holding the mutex fs_info->qgroup_ioctl_lock, and returning the
error -ENOTCONN in case it's NULL.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
0 files changed, 0 insertions, 0 deletions
