aboutsummaryrefslogtreecommitdiffstats
path: root/mount.cifs.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@samba.org>2012-11-28 15:17:44 -0500
committerJeff Layton <jlayton@samba.org>2012-12-03 09:58:57 -0500
commitde299f69392c18dc71d207482566f38abc909837 (patch)
treeb3354e77611846242d27be7d80a2f41d07da4c5b /mount.cifs.c
parent8b6e0cc242fc62436b0dd073e393bbdd62f39a83 (diff)
downloadcifs-utils-de299f69392c18dc71d207482566f38abc909837.tar.gz
cifs-utils-de299f69392c18dc71d207482566f38abc909837.tar.xz
cifs-utils-de299f69392c18dc71d207482566f38abc909837.zip
mount.cifs: don't pass "flag" options to the kernel
When certain options are passed to the mount helper, we want to turn them into mountflags for the mount() syscall. There's no need to copy them to the options string in that case though. Signed-off-by: Jeff Layton <jlayton@samba.org>
Diffstat (limited to 'mount.cifs.c')
-rw-r--r--mount.cifs.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/mount.cifs.c b/mount.cifs.c
index 9760d1f..869af35 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -1091,23 +1091,15 @@ parse_options(const char *data, struct parsed_mount_info *parsed_info)
"WARNING: '%s' not expressed in octal.\n",
data);
break;
-
- /* the following mount options should be
- stripped out from what is passed into the kernel
- since these options are best passed as the
- mount flags rather than redundantly to the kernel
- and could generate spurious warnings depending on the
- level of the corresponding cifs vfs kernel code */
case OPT_NO_SUID:
*filesys_flags |= MS_NOSUID;
- break;
+ goto nocopy;
case OPT_SUID:
*filesys_flags &= ~MS_NOSUID;
- break;
+ goto nocopy;
case OPT_NO_DEV:
*filesys_flags |= MS_NODEV;
- break;
- /* nolock || nobrl */
+ goto nocopy;
case OPT_NO_LOCK:
*filesys_flags &= ~MS_MANDLOCK;
break;
@@ -1119,17 +1111,17 @@ parse_options(const char *data, struct parsed_mount_info *parsed_info)
goto nocopy;
case OPT_DEV:
*filesys_flags &= ~MS_NODEV;
- break;
+ goto nocopy;
case OPT_NO_EXEC:
*filesys_flags |= MS_NOEXEC;
- break;
+ goto nocopy;
case OPT_EXEC:
*filesys_flags &= ~MS_NOEXEC;
- break;
+ goto nocopy;
case OPT_GUEST:
parsed_info->got_user = 1;
parsed_info->got_password = 1;
- break;
+ goto nocopy;
case OPT_RO:
*filesys_flags |= MS_RDONLY;
goto nocopy;
@@ -1138,7 +1130,7 @@ parse_options(const char *data, struct parsed_mount_info *parsed_info)
goto nocopy;
case OPT_REMOUNT:
*filesys_flags |= MS_REMOUNT;
- break;
+ goto nocopy;
case OPT_IGNORE:
goto nocopy;
case OPT_BKUPUID: