summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cache.c
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2020-06-05 17:19:46 -0500
committerSteve French <stfrench@microsoft.com>2020-06-06 11:16:25 -0500
commit5865985416ebb5a0c198a819a098b5cc300ac8a4 (patch)
tree915610812c337cc2777052d134950161aadcc6fb /fs/cifs/cache.c
parent3803d5e4d3ce2600ffddc16a1999798bc719042d (diff)
downloadlinux-5865985416ebb5a0c198a819a098b5cc300ac8a4.tar.bz2
smb3: extend fscache mount volume coherency check
It is better to check volume id and creation time, not just the root inode number to verify if the volume has changed when remounting. Reviewed-by: David Howells <dhowells@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cache.c')
-rw-r--r--fs/cifs/cache.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/cifs/cache.c b/fs/cifs/cache.c
index b7420e605b28..0f2adecb94f2 100644
--- a/fs/cifs/cache.c
+++ b/fs/cifs/cache.c
@@ -53,13 +53,6 @@ const struct fscache_cookie_def cifs_fscache_server_index_def = {
.type = FSCACHE_COOKIE_TYPE_INDEX,
};
-/*
- * Auxiliary data attached to CIFS superblock within the cache
- */
-struct cifs_fscache_super_auxdata {
- u64 resource_id; /* unique server resource id */
-};
-
char *extract_sharename(const char *treename)
{
const char *src;
@@ -98,6 +91,8 @@ fscache_checkaux cifs_fscache_super_check_aux(void *cookie_netfs_data,
memset(&auxdata, 0, sizeof(auxdata));
auxdata.resource_id = tcon->resource_id;
+ auxdata.vol_create_time = tcon->vol_create_time;
+ auxdata.vol_serial_number = tcon->vol_serial_number;
if (memcmp(data, &auxdata, datalen) != 0)
return FSCACHE_CHECKAUX_OBSOLETE;