cifs: use a refcount to protect open/closing the cached file handle
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com> Cc: <stable@vger.kernel.org>
This commit is contained in:

committed by
Steve French

parent
bf1fdeb789
commit
9da6ec7775
@@ -120,7 +120,9 @@ smb2_open_op_close(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
break;
|
||||
}
|
||||
|
||||
if (use_cached_root_handle == false)
|
||||
if (use_cached_root_handle)
|
||||
close_shroot(&tcon->crfid);
|
||||
else
|
||||
rc = SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid);
|
||||
if (tmprc)
|
||||
rc = tmprc;
|
||||
|
Reference in New Issue
Block a user