Commit a50f7951 authored by Trond Myklebust's avatar Trond Myklebust

NFS: Fix an Oops in the nfs_access_cache_shrinker()

The nfs_access_cache_shrinker may race with nfs_access_zap_cache().
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent e2f032e9
...@@ -1743,8 +1743,8 @@ int nfs_access_cache_shrinker(int nr_to_scan, gfp_t gfp_mask) ...@@ -1743,8 +1743,8 @@ int nfs_access_cache_shrinker(int nr_to_scan, gfp_t gfp_mask)
struct nfs_inode *nfsi; struct nfs_inode *nfsi;
struct nfs_access_entry *cache; struct nfs_access_entry *cache;
spin_lock(&nfs_access_lru_lock);
restart: restart:
spin_lock(&nfs_access_lru_lock);
list_for_each_entry(nfsi, &nfs_access_lru_list, access_cache_inode_lru) { list_for_each_entry(nfsi, &nfs_access_lru_list, access_cache_inode_lru) {
struct inode *inode; struct inode *inode;
...@@ -1769,6 +1769,7 @@ int nfs_access_cache_shrinker(int nr_to_scan, gfp_t gfp_mask) ...@@ -1769,6 +1769,7 @@ int nfs_access_cache_shrinker(int nr_to_scan, gfp_t gfp_mask)
clear_bit(NFS_INO_ACL_LRU_SET, &nfsi->flags); clear_bit(NFS_INO_ACL_LRU_SET, &nfsi->flags);
} }
spin_unlock(&inode->i_lock); spin_unlock(&inode->i_lock);
spin_unlock(&nfs_access_lru_lock);
iput(inode); iput(inode);
goto restart; goto restart;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment