Bugzilla – Attachment 202835 Details for
Bug 369024
martinu.suse.de - kernel BUG at fs/dcache.c:652!
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
[patch]
commit 6f23e3872cff238589f9bf39c71db2ea880c9a26
nfs-fix-race-between-umount-and-nfs_access_cache_shrinker (text/plain), 1.26 KB, created by
Sven Dietrich
on 2008-03-19 03:58:31 UTC
(
hide
)
Description:
commit 6f23e3872cff238589f9bf39c71db2ea880c9a26
Filename:
MIME Type:
Creator:
Sven Dietrich
Created:
2008-03-19 03:58:31 UTC
Size:
1.26 KB
patch
obsolete
>commit 6f23e3872cff238589f9bf39c71db2ea880c9a26 >Author: Trond Myklebust <Trond.Myklebust@netapp.com> >Date: Fri Jan 25 16:38:17 2008 -0500 > > NFS: Fix a potential race between umount and nfs_access_cache_shrinker() > > Thanks to Yawei Niu for spotting the race. > > Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> > >diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c >index 5ca762d..476cb0f 100644 >--- a/fs/nfs/dir.c >+++ b/fs/nfs/dir.c >@@ -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; >@@ -1719,6 +1725,7 @@ remove_lru_entry: > 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);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 369024
:
200131
|
202834
| 202835