summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2019-10-11 20:36:13 -0400
committerSteve French <stfrench@microsoft.com>2019-10-20 20:19:49 -0400
commit553292a6342bc9e5636953ac6e20bccedaacbd1c (patch)
tree55fbe34d42bf637811fda0caba63f1bc120f166b
parentd532cc7efdfd7bf4b9e1c287d823e584843f1de1 (diff)
cifs: clarify comment about timestamp granularity for old servers
It could be confusing why we set granularity to 1 seconds rather than 2 seconds (1 second is the max the VFS allows) for these mounts to very old servers ... Signed-off-by: Steve French <stfrench@microsoft.com>
-rw-r--r--fs/cifs/cifsfs.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index c049c7b3aa87..1a135d1b85bd 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -169,7 +169,13 @@ cifs_read_super(struct super_block *sb)
169 else 169 else
170 sb->s_maxbytes = MAX_NON_LFS; 170 sb->s_maxbytes = MAX_NON_LFS;
171 171
172 /* Some very old servers like DOS and OS/2 used 2 second granularity */ 172 /*
173 * Some very old servers like DOS and OS/2 used 2 second granularity
174 * (while all current servers use 100ns granularity - see MS-DTYP)
175 * but 1 second is the maximum allowed granularity for the VFS
176 * so for old servers set time granularity to 1 second while for
177 * everything else (current servers) set it to 100ns.
178 */
173 if ((tcon->ses->server->vals->protocol_id == SMB10_PROT_ID) && 179 if ((tcon->ses->server->vals->protocol_id == SMB10_PROT_ID) &&
174 ((tcon->ses->capabilities & 180 ((tcon->ses->capabilities &
175 tcon->ses->server->vals->cap_nt_find) == 0) && 181 tcon->ses->server->vals->cap_nt_find) == 0) &&