smb: client: make laundromat a delayed worker
authorSteve French <stfrench@microsoft.com>
Fri, 26 Jan 2024 00:52:03 +0000 (18:52 -0600)
committerSteve French <stfrench@microsoft.com>
Sat, 27 Jan 2024 06:13:46 +0000 (00:13 -0600)
commitdf9ff7ddabdbfdeeae5cd6aa29baa158d68ad3ba
tree3df36f7fe6c0508a097f912548f8fcb18f531286
parent29d685acdfd012f8f37b52daef6b4bd283a0115d
smb: client: make laundromat a delayed worker

By having laundromat kthread processing cached directories on every
second turned out to be overkill, especially when having multiple SMB
mounts.

Relax it by using a delayed worker instead that gets scheduled on
every @dir_cache_timeout (default=30) seconds per tcon.

This also fixes the 1s delay when tearing down tcon.

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/cifs/cached_dir.c
fs/cifs/cached_dir.h