aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/cifs_fs_sb.h1
-rw-r--r--fs/cifs/connect.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/fs/cifs/cifs_fs_sb.h b/fs/cifs/cifs_fs_sb.h
index 8ad2330ba061..877c85409f1f 100644
--- a/fs/cifs/cifs_fs_sb.h
+++ b/fs/cifs/cifs_fs_sb.h
@@ -30,6 +30,7 @@
30#define CIFS_MOUNT_CIFS_ACL 0x200 /* send ACL requests to non-POSIX srv */ 30#define CIFS_MOUNT_CIFS_ACL 0x200 /* send ACL requests to non-POSIX srv */
31#define CIFS_MOUNT_OVERR_UID 0x400 /* override uid returned from server */ 31#define CIFS_MOUNT_OVERR_UID 0x400 /* override uid returned from server */
32#define CIFS_MOUNT_OVERR_GID 0x800 /* override gid returned from server */ 32#define CIFS_MOUNT_OVERR_GID 0x800 /* override gid returned from server */
33#define CIFS_MOUNT_DYNPERM 0x1000 /* allow in-memory only mode setting */
33 34
34struct cifs_sb_info { 35struct cifs_sb_info {
35 struct cifsTconInfo *tcon; /* primary mount */ 36 struct cifsTconInfo *tcon; /* primary mount */
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index f428bf3bf1a9..8e2fa6d46c72 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -75,6 +75,7 @@ struct smb_vol {
75 bool setuids:1; 75 bool setuids:1;
76 bool override_uid:1; 76 bool override_uid:1;
77 bool override_gid:1; 77 bool override_gid:1;
78 bool dynperm:1;
78 bool noperm:1; 79 bool noperm:1;
79 bool no_psx_acl:1; /* set if posix acl support should be disabled */ 80 bool no_psx_acl:1; /* set if posix acl support should be disabled */
80 bool cifs_acl:1; 81 bool cifs_acl:1;
@@ -1246,6 +1247,10 @@ cifs_parse_mount_options(char *options, const char *devname,
1246 vol->setuids = 1; 1247 vol->setuids = 1;
1247 } else if (strnicmp(data, "nosetuids", 9) == 0) { 1248 } else if (strnicmp(data, "nosetuids", 9) == 0) {
1248 vol->setuids = 0; 1249 vol->setuids = 0;
1250 } else if (strnicmp(data, "dynperm", 7) == 0) {
1251 vol->dynperm = true;
1252 } else if (strnicmp(data, "nodynperm", 9) == 0) {
1253 vol->dynperm = false;
1249 } else if (strnicmp(data, "nohard", 6) == 0) { 1254 } else if (strnicmp(data, "nohard", 6) == 0) {
1250 vol->retry = 0; 1255 vol->retry = 0;
1251 } else if (strnicmp(data, "nosoft", 6) == 0) { 1256 } else if (strnicmp(data, "nosoft", 6) == 0) {
@@ -2125,6 +2130,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
2125 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_UID; 2130 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_UID;
2126 if (volume_info.override_gid) 2131 if (volume_info.override_gid)
2127 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_GID; 2132 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_GID;
2133 if (volume_info.dynperm)
2134 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DYNPERM;
2128 if (volume_info.direct_io) { 2135 if (volume_info.direct_io) {
2129 cFYI(1, ("mounting share using direct i/o")); 2136 cFYI(1, ("mounting share using direct i/o"));
2130 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO; 2137 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO;