Commit f27b92ec authored by Marc Aurèle La France's avatar Marc Aurèle La France Committed by Konstantin Komarov

fs/ntfs3: Fix [df]mask display in /proc/mounts

ntfs3's dmask and fmask mount options are 16-bit quantities but are displayed
as 1-extended 32-bit values in /proc/mounts.  Fix this by circumventing
integer promotion.
Signed-off-by: default avatarMarc Aurèle La France <tsi@tuyoix.net>
Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent 2681631c
...@@ -544,9 +544,9 @@ static int ntfs_show_options(struct seq_file *m, struct dentry *root) ...@@ -544,9 +544,9 @@ static int ntfs_show_options(struct seq_file *m, struct dentry *root)
seq_printf(m, ",gid=%u", seq_printf(m, ",gid=%u",
from_kgid_munged(user_ns, opts->fs_gid)); from_kgid_munged(user_ns, opts->fs_gid));
if (opts->fmask) if (opts->fmask)
seq_printf(m, ",fmask=%04o", ~opts->fs_fmask_inv); seq_printf(m, ",fmask=%04o", opts->fs_fmask_inv ^ 0xffff);
if (opts->dmask) if (opts->dmask)
seq_printf(m, ",dmask=%04o", ~opts->fs_dmask_inv); seq_printf(m, ",dmask=%04o", opts->fs_dmask_inv ^ 0xffff);
if (opts->nls) if (opts->nls)
seq_printf(m, ",iocharset=%s", opts->nls->charset); seq_printf(m, ",iocharset=%s", opts->nls->charset);
else else
......
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