diff options
| -rw-r--r-- | fs/smb/client/file.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c index 851b74f557c1..c6f523e6ce6f 100644 --- a/fs/smb/client/file.c +++ b/fs/smb/client/file.c @@ -3144,19 +3144,12 @@ oplock_break_ack: oplock_break_cancelled = cfile->oplock_break_cancelled; _cifsFileInfo_put(cfile, false /* do not wait for ourself */, false); - /* - * MS-SMB2 3.2.5.19.1 and 3.2.5.19.2 (and MS-CIFS 3.2.5.42) do not require - * an acknowledgment to be sent when the file has already been closed. - */ - spin_lock(&cinode->open_file_lock); - /* check list empty since can race with kill_sb calling tree disconnect */ - if (!oplock_break_cancelled && !list_empty(&cinode->openFileList)) { - spin_unlock(&cinode->open_file_lock); + /* MS-SMB2 3.2.5.19.1 and 3.2.5.19.2 (and MS-CIFS 3.2.5.42) */ + if (!oplock_break_cancelled) { rc = server->ops->oplock_response(tcon, persistent_fid, volatile_fid, net_fid, cinode); cifs_dbg(FYI, "Oplock release rc = %d\n", rc); - } else - spin_unlock(&cinode->open_file_lock); + } cifs_put_tlink(tlink); out: |
