Commit 86be6b8b authored by Jan Kara's avatar Jan Kara Committed by Christian Brauner

quota: Check presence of quota operation structures instead of ->quota_read...

quota: Check presence of quota operation structures instead of ->quota_read and ->quota_write callbacks

Currently we check whether superblock has ->quota_read and ->quota_write
operations to check whether filesystem supports quotas. However for
example for shmfs we will not read or write dquots so check whether
quota operations are set in the superblock instead.
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Reviewed-by: default avatarCarlos Maiolino <cmaiolino@redhat.com>
Message-Id: <20230725144510.253763-4-cem@kernel.org>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 71480663
......@@ -2367,7 +2367,7 @@ int dquot_load_quota_sb(struct super_block *sb, int type, int format_id,
if (!fmt)
return -ESRCH;
if (!sb->s_op->quota_write || !sb->s_op->quota_read ||
if (!sb->dq_op || !sb->s_qcop ||
(type == PRJQUOTA && sb->dq_op->get_projid == NULL)) {
error = -EINVAL;
goto out_fmt;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment