diff options
author | Paulo Alcantara <pc@manguebit.com> | 2024-02-24 22:57:14 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2024-03-11 03:33:58 +0300 |
commit | 1e5f4240714bb238d2d17c7e14e5fb45c9140665 (patch) | |
tree | 7aa8a7d8968c4bdf2452ec823aff48354c9b1627 /fs/smb | |
parent | 8bd25b61c5a55bc769c6608e9ce95860759acdcb (diff) | |
download | linux-1e5f4240714bb238d2d17c7e14e5fb45c9140665.tar.xz |
smb: client: return reparse type in /proc/mounts
Add support for returning reparse mount option in /proc/mounts.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202402262152.YZOwDlCM-lkp@intel.com/
Signed-off-by: Paulo Alcantara <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb')
-rw-r--r-- | fs/smb/client/cifsfs.c | 2 | ||||
-rw-r--r-- | fs/smb/client/cifsglob.h | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/fs/smb/client/cifsfs.c b/fs/smb/client/cifsfs.c index 62c4d54b301e..1bfd1b4c41d9 100644 --- a/fs/smb/client/cifsfs.c +++ b/fs/smb/client/cifsfs.c @@ -673,6 +673,8 @@ cifs_show_options(struct seq_file *s, struct dentry *root) seq_printf(s, ",backupgid=%u", from_kgid_munged(&init_user_ns, cifs_sb->ctx->backupgid)); + seq_show_option(s, "reparse", + cifs_reparse_type_str(cifs_sb->ctx->reparse_type)); seq_printf(s, ",rsize=%u", cifs_sb->ctx->rsize); seq_printf(s, ",wsize=%u", cifs_sb->ctx->wsize); diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h index 3afae8bf476d..a0506a45eae3 100644 --- a/fs/smb/client/cifsglob.h +++ b/fs/smb/client/cifsglob.h @@ -159,6 +159,18 @@ enum cifs_reparse_type { CIFS_REPARSE_TYPE_DEFAULT = CIFS_REPARSE_TYPE_NFS, }; +static inline const char *cifs_reparse_type_str(enum cifs_reparse_type type) +{ + switch (type) { + case CIFS_REPARSE_TYPE_NFS: + return "nfs"; + case CIFS_REPARSE_TYPE_WSL: + return "wsl"; + default: + return "unknown"; + } +} + struct session_key { unsigned int len; char *response; |