aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/cifsfs.c44
1 files changed, 32 insertions, 12 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index d9cf467309e8..7f87066ce29f 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -337,39 +337,59 @@ static int
337cifs_show_options(struct seq_file *s, struct vfsmount *m) 337cifs_show_options(struct seq_file *s, struct vfsmount *m)
338{ 338{
339 struct cifs_sb_info *cifs_sb; 339 struct cifs_sb_info *cifs_sb;
340 struct cifsTconInfo *tcon;
341 struct TCP_Server_Info *server;
340 342
341 cifs_sb = CIFS_SB(m->mnt_sb); 343 cifs_sb = CIFS_SB(m->mnt_sb);
342 344
343 if (cifs_sb) { 345 if (cifs_sb) {
344 if (cifs_sb->tcon) { 346 tcon = cifs_sb->tcon;
347 if (tcon) {
345/* BB add prepath to mount options displayed */ 348/* BB add prepath to mount options displayed */
346 seq_printf(s, ",unc=%s", cifs_sb->tcon->treeName); 349 seq_printf(s, ",unc=%s", cifs_sb->tcon->treeName);
347 if (cifs_sb->tcon->ses) { 350 if (tcon->ses) {
348 if (cifs_sb->tcon->ses->userName) 351 if (tcon->ses->userName)
349 seq_printf(s, ",username=%s", 352 seq_printf(s, ",username=%s",
350 cifs_sb->tcon->ses->userName); 353 tcon->ses->userName);
351 if (cifs_sb->tcon->ses->domainName) 354 if (tcon->ses->domainName)
352 seq_printf(s, ",domain=%s", 355 seq_printf(s, ",domain=%s",
353 cifs_sb->tcon->ses->domainName); 356 tcon->ses->domainName);
357 server = tcon->ses->server;
358 if (server) {
359 seq_printf(s, ",addr=");
360 switch (server->addr.sockAddr6.
361 sin6_family) {
362 case AF_INET6:
363 seq_printf(s, NIP6_FMT,
364 NIP6(server->addr.sockAddr6.sin6_addr));
365 break;
366 case AF_INET:
367 seq_printf(s, NIPQUAD_FMT,
368 NIPQUAD(server->addr.sockAddr.sin_addr.s_addr));
369 break;
370 }
371 }
354 } 372 }
355 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_UID) || 373 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_UID) ||
356 !(cifs_sb->tcon->unix_ext)) 374 !(tcon->unix_ext))
357 seq_printf(s, ",uid=%d", cifs_sb->mnt_uid); 375 seq_printf(s, ",uid=%d", cifs_sb->mnt_uid);
358 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID) || 376 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID) ||
359 !(cifs_sb->tcon->unix_ext)) 377 !(tcon->unix_ext))
360 seq_printf(s, ",gid=%d", cifs_sb->mnt_gid); 378 seq_printf(s, ",gid=%d", cifs_sb->mnt_gid);
361 if (!cifs_sb->tcon->unix_ext) { 379 if (!tcon->unix_ext) {
362 seq_printf(s, ",file_mode=0%o,dir_mode=0%o", 380 seq_printf(s, ",file_mode=0%o,dir_mode=0%o",
363 cifs_sb->mnt_file_mode, 381 cifs_sb->mnt_file_mode,
364 cifs_sb->mnt_dir_mode); 382 cifs_sb->mnt_dir_mode);
365 } 383 }
366 if (cifs_sb->tcon->seal) 384 if (tcon->seal)
367 seq_printf(s, ",seal"); 385 seq_printf(s, ",seal");
368 if (cifs_sb->tcon->nocase) 386 if (tcon->nocase)
369 seq_printf(s, ",nocase"); 387 seq_printf(s, ",nocase");
370 if (cifs_sb->tcon->retry) 388 if (tcon->retry)
371 seq_printf(s, ",hard"); 389 seq_printf(s, ",hard");
372 } 390 }
391 if (cifs_sb->prepath)
392 seq_printf(s, ",prepath=%s", cifs_sb->prepath);
373 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) 393 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)
374 seq_printf(s, ",posixpaths"); 394 seq_printf(s, ",posixpaths");
375 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) 395 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID)