On Mon, 2025-01-27 at 12:20 +1100, NeilBrown wrote: > There are at least three locks in the kernel which are initialised as > > spin_Lock_init(&l->lock); > > This makes them hard to differential in /proc/lock_stat. > > For the lock in nfsd/filecache.c introduce a variable with a more > descriptve name so we can: > > spin_lock_init(&nfsd_fcache_disposal->lock); > > and easily identify this in /proc/lock_stat. > > Signed-off-by: NeilBrown <neilb@xxxxxxx> > --- > fs/nfsd/filecache.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c > index eb95a53f806f..af95bc381753 100644 > --- a/fs/nfsd/filecache.c > +++ b/fs/nfsd/filecache.c > @@ -867,12 +867,13 @@ __nfsd_file_cache_purge(struct net *net) > static struct nfsd_fcache_disposal * > nfsd_alloc_fcache_disposal(void) > { > - struct nfsd_fcache_disposal *l; > + struct nfsd_fcache_disposal *l, *nfsd_fcache_disposal; > > l = kmalloc(sizeof(*l), GFP_KERNEL); > if (!l) > return NULL; > - spin_lock_init(&l->lock); > + nfsd_fcache_disposal = l; > + spin_lock_init(&nfsd_fcache_disposal->lock); > timer_setup(&l->timer, nfsd_file_gc_worker, 0); > INIT_LIST_HEAD(&l->recent); > INIT_LIST_HEAD(&l->older); Weird, but ok. Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>