Commit b4d3de57 authored by Jan Kara's avatar Jan Kara Committed by Andrew Morton

shmem: properly report quota mount options

Report quota options among the set of mount options. This allows proper
user visibility into whether quotas are enabled or not.

Link: https://lkml.kernel.org/r/20240129120131.21145-1-jack@suse.cz
Fixes: e09764cf ("shmem: quota support")
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Reviewed-by: default avatarCarlos Maiolino <cmaiolino@redhat.com>
Acked-by: default avatarHugh Dickins <hughd@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 73318e2c
......@@ -4265,6 +4265,24 @@ static int shmem_show_options(struct seq_file *seq, struct dentry *root)
mpol_put(mpol);
if (sbinfo->noswap)
seq_printf(seq, ",noswap");
#ifdef CONFIG_TMPFS_QUOTA
if (sb_has_quota_active(root->d_sb, USRQUOTA))
seq_printf(seq, ",usrquota");
if (sb_has_quota_active(root->d_sb, GRPQUOTA))
seq_printf(seq, ",grpquota");
if (sbinfo->qlimits.usrquota_bhardlimit)
seq_printf(seq, ",usrquota_block_hardlimit=%lld",
sbinfo->qlimits.usrquota_bhardlimit);
if (sbinfo->qlimits.grpquota_bhardlimit)
seq_printf(seq, ",grpquota_block_hardlimit=%lld",
sbinfo->qlimits.grpquota_bhardlimit);
if (sbinfo->qlimits.usrquota_ihardlimit)
seq_printf(seq, ",usrquota_inode_hardlimit=%lld",
sbinfo->qlimits.usrquota_ihardlimit);
if (sbinfo->qlimits.grpquota_ihardlimit)
seq_printf(seq, ",grpquota_inode_hardlimit=%lld",
sbinfo->qlimits.grpquota_ihardlimit);
#endif
return 0;
}
......
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