Fix kernel oops when CONFIG_DEBUG_ATOMIC_SLEEP is enabled.
authorRohith Surabattula <rohiths@microsoft.com>
Wed, 5 May 2021 10:56:47 +0000 (10:56 +0000)
committerSteve French <stfrench@microsoft.com>
Thu, 20 May 2021 02:11:26 +0000 (21:11 -0500)
commit860b69a9d77160d21ca00357fd6c5217f9d41fb1
tree5668410148272ff6aaacdc8418320f79b14f503f
parente83aa3528a38bddae182a35d0efb5a6c35143c1c
Fix kernel oops when CONFIG_DEBUG_ATOMIC_SLEEP is enabled.

Removed oplock_break_received flag which was added to achieve
synchronization between oplock handler and open handler by earlier commit.

It is not needed because there is an existing lock open_file_lock to achieve
the same. find_readable_file takes open_file_lock and then traverses the
openFileList. Similarly, cifs_oplock_break while closing the deferred
handle (i.e cifsFileInfo_put) takes open_file_lock and then sends close
to the server.

Added comments for better readability.

Signed-off-by: Rohith Surabattula <rohiths@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsfs.c
fs/cifs/cifsglob.h
fs/cifs/file.c
fs/cifs/misc.c