Skip to content

Commit

Permalink
cifs: Do not use tcon->cfid directly, use the cfid we get from open_c…
Browse files Browse the repository at this point in the history
…ached_dir

They are the same right now but tcon-> will later point to a different
type of struct containing a list of cfids.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
Ronnie Sahlberg authored and Steve French committed Aug 12, 2022
1 parent 05b98fd commit dcb45fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fs/cifs/smb2inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,9 @@ smb2_query_path_info(const unsigned int xid, struct cifs_tcon *tcon,
rc = open_cached_dir(xid, tcon, full_path, cifs_sb, &cfid);
/* If it is a root and its handle is cached then use it */
if (!rc) {
if (tcon->cfid.file_all_info_is_valid) {
if (cfid->file_all_info_is_valid) {
move_smb2_info_to_cifs(data,
&tcon->cfid.file_all_info);
&cfid->file_all_info);
} else {
rc = SMB2_query_info(xid, tcon,
cfid->fid->persistent_fid,
Expand Down
2 changes: 1 addition & 1 deletion fs/cifs/smb2pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1979,7 +1979,7 @@ SMB2_tdis(const unsigned int xid, struct cifs_tcon *tcon)
}
spin_unlock(&ses->chan_lock);

close_cached_dir_lease(&tcon->cfid);
invalidate_all_cached_dirs(tcon);

rc = smb2_plain_req_init(SMB2_TREE_DISCONNECT, tcon, ses->server,
(void **) &req,
Expand Down

0 comments on commit dcb45fd

Please sign in to comment.