Skip to content

Commit c057a80

Browse files
Paulo Alcantaragregkh
authored andcommitted
smb: client: return reparse type in /proc/mounts
[ Upstream commit 1e5f424 ] Add support for returning reparse mount option in /proc/mounts. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Paulo Alcantara <[email protected]> Signed-off-by: Steve French <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 5825240 commit c057a80

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

fs/smb/client/cifsfs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,8 @@ cifs_show_options(struct seq_file *s, struct dentry *root)
674674
seq_printf(s, ",backupgid=%u",
675675
from_kgid_munged(&init_user_ns,
676676
cifs_sb->ctx->backupgid));
677+
seq_show_option(s, "reparse",
678+
cifs_reparse_type_str(cifs_sb->ctx->reparse_type));
677679

678680
seq_printf(s, ",rsize=%u", cifs_sb->ctx->rsize);
679681
seq_printf(s, ",wsize=%u", cifs_sb->ctx->wsize);

fs/smb/client/cifsglob.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,18 @@ enum cifs_reparse_type {
159159
CIFS_REPARSE_TYPE_DEFAULT = CIFS_REPARSE_TYPE_NFS,
160160
};
161161

162+
static inline const char *cifs_reparse_type_str(enum cifs_reparse_type type)
163+
{
164+
switch (type) {
165+
case CIFS_REPARSE_TYPE_NFS:
166+
return "nfs";
167+
case CIFS_REPARSE_TYPE_WSL:
168+
return "wsl";
169+
default:
170+
return "unknown";
171+
}
172+
}
173+
162174
struct session_key {
163175
unsigned int len;
164176
char *response;

0 commit comments

Comments
 (0)