diff options
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 32fa4d9b5dbc..bb17ee2ba782 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -105,6 +105,7 @@ struct smb_vol { | |||
105 | unsigned int wsize; | 105 | unsigned int wsize; |
106 | bool sockopt_tcp_nodelay:1; | 106 | bool sockopt_tcp_nodelay:1; |
107 | unsigned short int port; | 107 | unsigned short int port; |
108 | unsigned long actimeo; /* attribute cache timeout (jiffies) */ | ||
108 | char *prepath; | 109 | char *prepath; |
109 | struct sockaddr_storage srcaddr; /* allow binding to a local IP */ | 110 | struct sockaddr_storage srcaddr; /* allow binding to a local IP */ |
110 | struct nls_table *local_nls; | 111 | struct nls_table *local_nls; |
@@ -840,6 +841,8 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
840 | /* default to using server inode numbers where available */ | 841 | /* default to using server inode numbers where available */ |
841 | vol->server_ino = 1; | 842 | vol->server_ino = 1; |
842 | 843 | ||
844 | vol->actimeo = CIFS_DEF_ACTIMEO; | ||
845 | |||
843 | if (!options) | 846 | if (!options) |
844 | return 1; | 847 | return 1; |
845 | 848 | ||
@@ -1214,6 +1217,16 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1214 | printk(KERN_WARNING "CIFS: server net" | 1217 | printk(KERN_WARNING "CIFS: server net" |
1215 | "biosname longer than 15 truncated.\n"); | 1218 | "biosname longer than 15 truncated.\n"); |
1216 | } | 1219 | } |
1220 | } else if (strnicmp(data, "actimeo", 7) == 0) { | ||
1221 | if (value && *value) { | ||
1222 | vol->actimeo = HZ * simple_strtoul(value, | ||
1223 | &value, 0); | ||
1224 | if (vol->actimeo > CIFS_MAX_ACTIMEO) { | ||
1225 | cERROR(1, "CIFS: attribute cache" | ||
1226 | "timeout too large"); | ||
1227 | return 1; | ||
1228 | } | ||
1229 | } | ||
1217 | } else if (strnicmp(data, "credentials", 4) == 0) { | 1230 | } else if (strnicmp(data, "credentials", 4) == 0) { |
1218 | /* ignore */ | 1231 | /* ignore */ |
1219 | } else if (strnicmp(data, "version", 3) == 0) { | 1232 | } else if (strnicmp(data, "version", 3) == 0) { |
@@ -2571,6 +2584,8 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info, | |||
2571 | cFYI(1, "file mode: 0x%x dir mode: 0x%x", | 2584 | cFYI(1, "file mode: 0x%x dir mode: 0x%x", |
2572 | cifs_sb->mnt_file_mode, cifs_sb->mnt_dir_mode); | 2585 | cifs_sb->mnt_file_mode, cifs_sb->mnt_dir_mode); |
2573 | 2586 | ||
2587 | cifs_sb->actimeo = pvolume_info->actimeo; | ||
2588 | |||
2574 | if (pvolume_info->noperm) | 2589 | if (pvolume_info->noperm) |
2575 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_PERM; | 2590 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_PERM; |
2576 | if (pvolume_info->setuids) | 2591 | if (pvolume_info->setuids) |