On Thu, Apr 20, 2023 at 11:15 PM Paulo Alcantara <pc@xxxxxxxxxxxxx> wrote: > > Bharath SM <bharathsm.hsk@xxxxxxxxx> writes: > > > From: Bharath SM <bharathsm@xxxxxxxxxxxxx> > > > > 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. > > > > Signed-off-by: Bharath SM <bharathsm@xxxxxxxxxxxxx> > > --- > > fs/cifs/misc.c | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c > > index a0d286ee723d..89bbc12e2ca7 100644 > > --- a/fs/cifs/misc.c > > +++ b/fs/cifs/misc.c > > @@ -742,7 +742,10 @@ cifs_close_deferred_file(struct cifsInodeInfo *cifs_inode) > > list_for_each_entry(cfile, &cifs_inode->openFileList, flist) { > > if (delayed_work_pending(&cfile->deferred)) { > > if (cancel_delayed_work(&cfile->deferred)) { > > + > > No need for this extra blank line. Please remove the below ones as > well. > > With the "Fixes:" tag added as per Ronnie's suggestion, > > Acked-by: Paulo Alcantara (SUSE) <pc@xxxxxxxxxxxxx> Done. Please find updated patch in attachments.
Attachment:
0001-SMB3-Add-missing-locks-to-protect-deferred-close-fil.patch
Description: Binary data