Skip to content

smb: client: fix unmount busy dentry/inode races on openFileList

Siddharth Chintamaneni linux-cifs lkml 1 version Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2smb: client: fix busy dentry and inode on unmount from late oplock breakfs/smb/client/cifsfs.c fs/smb/client/file.c fs/smb/client/misc.c+12 -60 replies
2/2smb: client: fix busy dentry on unmount from persistent handle reopenfs/smb/client/file.c+7 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/2] smb: client: fix unmount busy dentry/inode races on openFileList

This series fixes two unmount races in cifs_kill_sb() where background paths walk tcon->openFileList while wait_var_event() is waiting on cifs_sb->outstanding_rreq and take new cifsFileInfo references that outlive the wait, causing busy dentry/inode warnings and panics in generic_shutdown_super():

- Patch 1 counts queued oplock/lease breaks in cifs_sb->outstanding_rreq from cifs_queue_oplock_break() until cifs_oplock_break() completes.
- Patch 2 counts persistent handle reopens in cifs_sb->outstanding_rreq in cifs_reopen_persistent_handles() until cifsFileInfo_put() drops the handle reference.

Siddharth Chintamaneni (2):
smb: client: fix busy dentry and inode on unmount from late oplock
break
smb: client: fix busy dentry on unmount from persistent handle reopen

 fs/smb/client/cifsfs.c | 10 +++++-----
 fs/smb/client/file.c   |  9 +++++++++
 fs/smb/client/misc.c   |  6 +++++-
 3 files changed, 19 insertions(+), 6 deletions(-)
Signature · 1 line
2.43.0