WSL2-Linux-Kernel/fs/cifs
Steve French 491eafce1a smb3: fix unusable share after force unmount failure
If user does forced unmount ("umount -f") while files are still open
on the share (as was seen in a Kubernetes example running on SMB3.1.1
mount) then we were marking the share as "TID_EXITING" in umount_begin()
which caused all subsequent operations (except write) to fail ... but
unfortunately when umount_begin() is called we do not know yet that
there are open files or active references on the share that would prevent
unmount from succeeding.  Kubernetes had example when they were doing
umount -f when files were open which caused the share to become
unusable until the files were closed (and the umount retried).

Fix this so that TID_EXITING is not set until we are about to send
the tree disconnect (not at the beginning of forced umounts in
umount_begin) so that if "umount -f" fails (due to open files or
references) the mount is still usable.

Cc: stable@vger.kernel.org
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-03-24 14:37:12 -05:00
..
Kconfig cifs: Change the I/O paths to use an iterator rather than a page list 2023-02-20 18:36:02 -06:00
Makefile
asn1.c
cached_dir.c cifs: fix dentry lookups in directory handle cache 2023-03-24 14:37:12 -05:00
cached_dir.h
cifs_debug.c cifs: print session id while listing open files 2023-03-23 11:19:42 -05:00
cifs_debug.h
cifs_dfs_ref.c cifs: set DFS root session in cifs_get_smb_ses() 2023-03-14 21:05:53 -05:00
cifs_fs_sb.h cifs: fix use-after-free bug in refresh_cache_worker() 2023-03-14 21:07:44 -05:00
cifs_ioctl.h
cifs_spnego.c
cifs_spnego.h cifs: Replace remaining 1-element arrays 2023-02-20 11:48:48 -06:00
cifs_spnego_negtokeninit.asn1
cifs_swn.c
cifs_swn.h
cifs_unicode.c
cifs_unicode.h
cifs_uniupr.h
cifsacl.c 46 fs/cifs (smb3 client) changesets, 37 in fs/cifs and 9 for related helper functions and cleanup outside from Dave Howells and Willy 2023-02-22 17:12:44 -08:00
cifsacl.h
cifsencrypt.c cifs: Change the I/O paths to use an iterator rather than a page list 2023-02-20 18:36:02 -06:00
cifsfs.c smb3: fix unusable share after force unmount failure 2023-03-24 14:37:12 -05:00
cifsfs.h 46 fs/cifs (smb3 client) changesets, 37 in fs/cifs and 9 for related helper functions and cleanup outside from Dave Howells and Willy 2023-02-22 17:12:44 -08:00
cifsglob.h cifs: fix use-after-free bug in refresh_cache_worker() 2023-03-14 21:07:44 -05:00
cifspdu.h cifs: Replace remaining 1-element arrays 2023-02-20 11:48:48 -06:00
cifsproto.h cifs: prevent data race in cifs_reconnect_tcon() 2023-03-01 18:18:25 -06:00
cifsroot.c
cifssmb.c smb3: fix unusable share after force unmount failure 2023-03-24 14:37:12 -05:00
connect.c smb3: fix unusable share after force unmount failure 2023-03-24 14:37:12 -05:00
dfs.c cifs: check only tcon status on tcon related functions 2023-03-17 13:22:22 -05:00
dfs.h cifs: fix use-after-free bug in refresh_cache_worker() 2023-03-14 21:07:44 -05:00
dfs_cache.c cifs: check only tcon status on tcon related functions 2023-03-17 13:22:22 -05:00
dfs_cache.h cifs: fix use-after-free bug in refresh_cache_worker() 2023-03-14 21:07:44 -05:00
dir.c 46 fs/cifs (smb3 client) changesets, 37 in fs/cifs and 9 for related helper functions and cleanup outside from Dave Howells and Willy 2023-02-22 17:12:44 -08:00
dns_resolve.c
dns_resolve.h
export.c
file.c cifs: check only tcon status on tcon related functions 2023-03-17 13:22:22 -05:00
fs_context.c
fs_context.h smb3: lower default deferred close timeout to address perf regression 2023-03-24 14:37:12 -05:00
fscache.c 46 fs/cifs (smb3 client) changesets, 37 in fs/cifs and 9 for related helper functions and cleanup outside from Dave Howells and Willy 2023-02-22 17:12:44 -08:00
fscache.h cifs: Change the I/O paths to use an iterator rather than a page list 2023-02-20 18:36:02 -06:00
inode.c 46 fs/cifs (smb3 client) changesets, 37 in fs/cifs and 9 for related helper functions and cleanup outside from Dave Howells and Willy 2023-02-22 17:12:44 -08:00
ioctl.c
link.c cifs: append path to open_enter trace event 2023-03-24 09:02:26 -05:00
misc.c cifs: use DFS root session instead of tcon ses 2023-03-14 22:48:53 -05:00
netlink.c
netlink.h
netmisc.c
nterr.c
nterr.h
ntlmssp.h cifs: Replace zero-length arrays with flexible-array members 2023-02-20 11:48:47 -06:00
readdir.c cifs: Replace remaining 1-element arrays 2023-02-20 11:48:48 -06:00
rfc1002pdu.h
sess.c cifs: get rid of dns resolve worker 2023-02-20 17:25:43 -06:00
smb1ops.c cifs: Fix uninitialized memory reads for oparms.mode 2023-02-20 11:48:48 -06:00
smb2file.c 46 fs/cifs (smb3 client) changesets, 37 in fs/cifs and 9 for related helper functions and cleanup outside from Dave Howells and Willy 2023-02-22 17:12:44 -08:00
smb2glob.h
smb2inode.c cifs: append path to open_enter trace event 2023-03-24 09:02:26 -05:00
smb2maperror.c
smb2misc.c smb3: Replace smb2pdu 1-element arrays with flex-arrays 2023-02-20 17:25:43 -06:00
smb2ops.c cifs: append path to open_enter trace event 2023-03-24 09:02:26 -05:00
smb2pdu.c smb3: fix unusable share after force unmount failure 2023-03-24 14:37:12 -05:00
smb2pdu.h smb3: Replace smb2pdu 1-element arrays with flex-arrays 2023-02-20 17:25:43 -06:00
smb2proto.h
smb2status.h
smb2transport.c cifs: avoid race conditions with parallel reconnects 2023-03-24 09:03:55 -05:00
smbdirect.c cifs: Fix an uninitialised variable 2023-03-01 18:17:36 -06:00
smbdirect.h cifs: Build the RDMA SGE list directly from an iterator 2023-02-20 18:36:02 -06:00
smbencrypt.c
smberr.h
trace.c
trace.h cifs: append path to open_enter trace event 2023-03-24 09:02:26 -05:00
transport.c cifs: Move the in_send statistic to __smb_send_rqst() 2023-03-05 17:50:38 -06:00
unc.c
winucase.c
xattr.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00