]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
smb: client: prevent new fids from being removed by laundromat
authorPaulo Alcantara <pc@manguebit.com>
Mon, 9 Oct 2023 20:37:40 +0000 (17:37 -0300)
committerSteve French <stfrench@microsoft.com>
Thu, 12 Oct 2023 14:41:32 +0000 (09:41 -0500)
commit81ba10959970d15c388bf29866b01b62f387e6a3
tree030184ad6cca30cb57637bc1dc3b031ad2da0cd3
parente95f3f74465072c2545d8e65a3c3a96e37129cf8
smb: client: prevent new fids from being removed by laundromat

Check if @cfid->time is set in laundromat so we guarantee that only
fully cached fids will be selected for removal.  While we're at it,
add missing locks to protect access of @cfid fields in order to avoid
races with open_cached_dir() and cfids_laundromat_worker(),
respectively.

Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cached_dir.c