File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -288,6 +288,18 @@ nfsd_file_do_unhash(struct nfsd_file *nf)
288288 atomic_long_dec (& nfsd_filecache_count );
289289}
290290
291+ static void
292+ nfsd_file_hash_remove (struct nfsd_file * nf )
293+ {
294+ struct inode * inode = nf -> nf_inode ;
295+ unsigned int hashval = (unsigned int )hash_long (inode -> i_ino ,
296+ NFSD_FILE_HASH_BITS );
297+
298+ spin_lock (& nfsd_file_hashtbl [hashval ].nfb_lock );
299+ nfsd_file_do_unhash (nf );
300+ spin_unlock (& nfsd_file_hashtbl [hashval ].nfb_lock );
301+ }
302+
291303static bool
292304nfsd_file_unhash (struct nfsd_file * nf )
293305{
@@ -507,11 +519,8 @@ static void nfsd_file_gc_dispose_list(struct list_head *dispose)
507519{
508520 struct nfsd_file * nf ;
509521
510- list_for_each_entry (nf , dispose , nf_lru ) {
511- spin_lock (& nfsd_file_hashtbl [nf -> nf_hashval ].nfb_lock );
512- nfsd_file_do_unhash (nf );
513- spin_unlock (& nfsd_file_hashtbl [nf -> nf_hashval ].nfb_lock );
514- }
522+ list_for_each_entry (nf , dispose , nf_lru )
523+ nfsd_file_hash_remove (nf );
515524 nfsd_file_dispose_list_delayed (dispose );
516525}
517526
You can’t perform that action at this time.
0 commit comments