]> www.infradead.org Git - users/jedix/linux-maple.git/commit
smb: client: add ParentLeaseKey support
authorHenrique Carvalho <henrique.carvalho@suse.com>
Thu, 8 May 2025 16:09:51 +0000 (13:09 -0300)
committerSteve French <stfrench@microsoft.com>
Mon, 2 Jun 2025 01:46:45 +0000 (20:46 -0500)
commit51b78ffb803657fe38788d5715eee591cd7c0740
tree07be7c4588492bfab9a876adeb7f69d016b4ab9e
parenta3e771afbb3bce91c8296828304903e7348003fe
smb: client: add ParentLeaseKey support

According to MS-SMB2 3.2.4.3.8, when opening a file the client must
lookup its parent directory, copy that entry’s LeaseKey into
ParentLeaseKey, and set SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET.

Extend lease context functions to carry a parent_lease_key and
lease_flags and to add them to the lease context buffer accordingly in
smb3_create_lease_buf. Also add a parent_lease_key field to struct
cifs_fid and lease_flags to cifs_open_parms.

Only applies to the SMB 3.x dialect family.

Fixes: f047390a097e ("CIFS: Add create lease v2 context for SMB3")
Signed-off-by: Henrique Carvalho <henrique.carvalho@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsglob.h
fs/smb/client/smb2ops.c
fs/smb/client/smb2pdu.c