Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79680
b: refs/heads/master
c: 6f23e38
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jan 30, 2008
1 parent 8cb61a4 commit a3f547f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e6f810759505bc86c009854b82cc495ffd8eb020
refs/heads/master: 6f23e3872cff238589f9bf39c71db2ea880c9a26
9 changes: 8 additions & 1 deletion trunk/fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1694,13 +1694,19 @@ int nfs_access_cache_shrinker(int nr_to_scan, gfp_t gfp_mask)
restart:
spin_lock(&nfs_access_lru_lock);
list_for_each_entry(nfsi, &nfs_access_lru_list, access_cache_inode_lru) {
struct rw_semaphore *s_umount;
struct inode *inode;

if (nr_to_scan-- == 0)
break;
s_umount = &nfsi->vfs_inode.i_sb->s_umount;
if (!down_read_trylock(s_umount))
continue;
inode = igrab(&nfsi->vfs_inode);
if (inode == NULL)
if (inode == NULL) {
up_read(s_umount);
continue;
}
spin_lock(&inode->i_lock);
if (list_empty(&nfsi->access_cache_entry_lru))
goto remove_lru_entry;
Expand All @@ -1719,6 +1725,7 @@ int nfs_access_cache_shrinker(int nr_to_scan, gfp_t gfp_mask)
spin_unlock(&inode->i_lock);
spin_unlock(&nfs_access_lru_lock);
iput(inode);
up_read(s_umount);
goto restart;
}
spin_unlock(&nfs_access_lru_lock);
Expand Down

0 comments on commit a3f547f

Please sign in to comment.