SMB3: Add missing locks to protect deferred close file list
authorBharath SM <bharathsm@microsoft.com>
Thu, 20 Apr 2023 13:54:33 +0000 (13:54 +0000)
committerSteve French <stfrench@microsoft.com>
Thu, 27 Apr 2023 16:00:10 +0000 (11:00 -0500)
commitab9ddc87a9055c4bebd6524d5d761d605d52e557
treeb643b668a8bff2813d7e77d74bf99a1c5361664d
parent919e57c3147ce66ed0887168e622c5e7a8f04440
SMB3: Add missing locks to protect deferred close file list

cifs_del_deferred_close function has a critical section which modifies
the deferred close file list. We must acquire deferred_lock before
calling cifs_del_deferred_close function.

Fixes: ca08d0eac020 ("cifs: Fix memory leak on the deferred close")
Signed-off-by: Bharath SM <bharathsm@microsoft.com>
Acked-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/misc.c