smb: client: make laundromat a delayed worker
authorPaulo Alcantara <pc@manguebit.com>
Thu, 5 Oct 2023 19:04:25 +0000 (16:04 -0300)
committerSteve French <stfrench@microsoft.com>
Thu, 12 Oct 2023 14:41:04 +0000 (09:41 -0500)
commite95f3f74465072c2545d8e65a3c3a96e37129cf8
treed0301b7a7efda7e19b0f158d78c308dd7507d929
parent94f6f0550c625fab1f373bb86a6669b45e9748b3
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/smb/client/cached_dir.c
fs/smb/client/cached_dir.h