linux/fs/smb/client
Meetakshi Setiya 71f15c90e7 smb: client: retry compound request without reusing lease
There is a shortcoming in the current implementation of the file
lease mechanism exposed when the lease keys were attempted to be
reused for unlink, rename and set_path_size operations for a client. As
per MS-SMB2, lease keys are associated with the file name. Linux smb
client maintains lease keys with the inode. If the file has any hardlinks,
it is possible that the lease for a file be wrongly reused for an
operation on the hardlink or vice versa. In these cases, the mentioned
compound operations fail with STATUS_INVALID_PARAMETER.
This patch adds a fallback to the old mechanism of not sending any
lease with these compound operations if the request with lease key fails
with STATUS_INVALID_PARAMETER.
Resending the same request without lease key should not hurt any
functionality, but might impact performance especially in cases where
the error is not because of the usage of wrong lease key and we might
end up doing an extra roundtrip.

Signed-off-by: Meetakshi Setiya <msetiya@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2024-03-10 19:33:54 -05:00
..
asn1.c
cached_dir.c cifs: update the same create_guid on replay 2024-02-11 19:07:08 -06:00
cached_dir.h smb: client: make laundromat a delayed worker 2023-10-12 09:41:04 -05:00
cifs_debug.c cifs: allow changing password during remount 2024-03-10 19:33:53 -05:00
cifs_debug.h
cifs_fs_sb.h
cifs_ioctl.h smb3: allow dumping session and tcon id to improve stats analysis and debugging 2023-11-10 02:00:30 -06:00
cifs_spnego_negtokeninit.asn1
cifs_spnego.c cifs: spnego: add ';' in HOST_KEY_LEN 2023-11-13 16:21:34 -06:00
cifs_spnego.h
cifs_swn.c
cifs_swn.h
cifs_unicode.c fs/smb/client: Use common code in client 2023-08-30 08:55:52 -05:00
cifs_unicode.h fs/smb/client: Use common code in client 2023-08-30 08:55:52 -05:00
cifsacl.c
cifsacl.h
cifsencrypt.c smb: Work around Clang __bdos() type confusion 2024-01-23 18:56:16 -06:00
cifsfs.c smb: remove SLAB_MEM_SPREAD flag usage 2024-03-10 19:33:53 -05:00
cifsfs.h cifs: update internal module version number for cifs.ko 2024-01-09 23:42:51 -06:00
cifsglob.h smb: client: do not defer close open handles to deleted files 2024-03-10 19:33:54 -05:00
cifspdu.h smb: client, common: fix fortify warnings 2023-11-30 11:17:03 -06:00
cifsproto.h smb: client: do not defer close open handles to deleted files 2024-03-10 19:33:54 -05:00
cifsroot.c
cifssmb.c smb: client: reuse file lease key in compound operations 2024-03-10 19:33:54 -05:00
connect.c smb: Fix regression in writes when non-standard maximum write size negotiated 2024-02-15 22:19:23 -06:00
dfs_cache.c smb: client: ensure to try all targets when finding nested links 2023-08-20 16:05:50 -05:00
dfs_cache.h smb: client: ensure to try all targets when finding nested links 2023-08-20 16:05:50 -05:00
dfs.c cifs: change tcon status when need_reconnect is set on it 2024-02-09 14:43:23 -06:00
dfs.h smb: client: get rid of dfs code dep in namespace.c 2023-08-20 16:05:50 -05:00
dir.c smb: client: allow creating special files via reparse points 2024-01-07 15:46:05 -06:00
dns_resolve.c
dns_resolve.h
export.c exportfs: make ->encode_fh() a mandatory method for NFS export 2023-10-28 16:15:15 +02:00
file.c smb: client: do not defer close open handles to deleted files 2024-03-10 19:33:54 -05:00
fs_context.c cifs: allow changing password during remount 2024-03-10 19:33:53 -05:00
fs_context.h cifs: new mount option called retrans 2024-01-19 10:31:57 -06:00
fscache.c netfs, cachefiles: Pass upper bound length to allow expansion 2023-12-28 09:45:25 +00:00
fscache.h client: convert to new timestamp accessors 2023-10-18 14:08:27 +02:00
inode.c smb: client: do not defer close open handles to deleted files 2024-03-10 19:33:54 -05:00
ioctl.c Missing field not being returned in ioctl CIFS_IOC_GET_MNT_INFO 2023-11-10 09:32:04 -06:00
Kconfig fs/smb/client: Use common code in client 2023-08-30 08:55:52 -05:00
link.c smb: client: allow creating symlinks via reparse points 2024-01-07 15:46:06 -06:00
Makefile smb: client: get rid of dfs code dep in namespace.c 2023-08-20 16:05:50 -05:00
misc.c smb: client: do not defer close open handles to deleted files 2024-03-10 19:33:54 -05:00
namespace.c smb: client: set correct id, uid and cruid for multiuser automounts 2024-02-12 12:46:49 -06:00
netlink.c
netlink.h
netmisc.c
nterr.c
nterr.h
ntlmssp.h cifs: Add client version details to NTLM authenticate message 2023-10-22 19:03:42 -05:00
readdir.c cifs: prevent updating file size from server if we have a read/write lease 2024-03-10 19:33:53 -05:00
rfc1002pdu.h
sess.c cifs: handle cases where multiple sessions share connection 2024-02-09 14:43:25 -06:00
smb1ops.c smb: client: introduce cifs_sfu_make_node() 2023-11-23 11:46:05 -06:00
smb2file.c
smb2glob.h smb: client: optimise reparse point querying 2024-01-07 15:46:05 -06:00
smb2inode.c smb: client: retry compound request without reusing lease 2024-03-10 19:33:54 -05:00
smb2maperror.c cifs: new nt status codes from MS-SMB2 2024-01-18 21:01:04 -06:00
smb2misc.c smb: client: fix potential OOB in smb2_dump_detail() 2023-12-19 10:33:39 -06:00
smb2ops.c smb: client: handle path separator of created SMB symlinks 2024-02-12 12:47:21 -06:00
smb2pdu.c cifs: allow changing password during remount 2024-03-10 19:33:53 -05:00
smb2pdu.h smb: client, common: fix fortify warnings 2023-11-30 11:17:03 -06:00
smb2proto.h smb: client: reuse file lease key in compound operations 2024-03-10 19:33:54 -05:00
smb2status.h cifs: new nt status codes from MS-SMB2 2024-01-18 21:01:04 -06:00
smb2transport.c cifs: fix check of rc in function generate_smb3signingkey 2023-11-13 16:22:30 -06:00
smbdirect.c smb3: Improve exception handling in allocate_mr_list() 2024-01-07 15:46:06 -06:00
smbdirect.h
smbencrypt.c smb: client: delete "true", "false" defines 2024-01-23 12:41:02 -06:00
smberr.h
trace.c
trace.h smb: client: optimise reparse point querying 2024-01-07 15:46:05 -06:00
transport.c smb: client: increase number of PDUs allowed in a compound request 2024-02-01 12:15:51 -06:00
unc.c
winucase.c
xattr.c smb3: fix caching of ctime on setxattr 2023-11-09 10:25:58 -06:00