mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
smb3: fix Open files on server counter going negative
commit 28e0947651ce6a2200b9a7eceb93282e97d7e51a upstream.
We were decrementing the count of open files on server twice
for the case where we were closing cached directories.
Fixes: 8e843bf38f ("cifs: return a single-use cfid if we did not get a lease")
Cc: stable@vger.kernel.org
Acked-by: Bharath SM <bharathsm@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cd5d98c055
commit
ca5962bdc5
@@ -386,8 +386,8 @@ smb2_close_cached_fid(struct kref *ref)
|
|||||||
if (cfid->is_open) {
|
if (cfid->is_open) {
|
||||||
rc = SMB2_close(0, cfid->tcon, cfid->fid.persistent_fid,
|
rc = SMB2_close(0, cfid->tcon, cfid->fid.persistent_fid,
|
||||||
cfid->fid.volatile_fid);
|
cfid->fid.volatile_fid);
|
||||||
if (rc != -EBUSY && rc != -EAGAIN)
|
if (rc) /* should we retry on -EBUSY or -EAGAIN? */
|
||||||
atomic_dec(&cfid->tcon->num_remote_opens);
|
cifs_dbg(VFS, "close cached dir rc %d\n", rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
free_cached_dir(cfid);
|
free_cached_dir(cfid);
|
||||||
|
|||||||
Reference in New Issue
Block a user