Skip to content

Commit 94f8737

Browse files
aaptelsmfrench
authored andcommitted
fs/cifs: keep guid when assigning fid to fileinfo
When we open a durable handle we give a Globally Unique Identifier (GUID) to the server which we must keep for later reference e.g. when reopening persistent handles on reconnection. Without this the GUID generated for a new persistent handle was lost and 16 zero bytes were used instead on re-opening. Signed-off-by: Aurelien Aptel <[email protected]> CC: Stable <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent fa70b87 commit 94f8737

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/cifs/smb2ops.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,7 @@ smb2_set_fid(struct cifsFileInfo *cfile, struct cifs_fid *fid, __u32 oplock)
541541
server->ops->set_oplock_level(cinode, oplock, fid->epoch,
542542
&fid->purge_cache);
543543
cinode->can_cache_brlcks = CIFS_CACHE_WRITE(cinode);
544+
memcpy(cfile->fid.create_guid, fid->create_guid, 16);
544545
}
545546

546547
static void

0 commit comments

Comments
 (0)