diff options
author | Trond Myklebust | 2007-01-24 11:54:55 -0800 |
---|---|---|
committer | Linus Torvalds | 2007-01-24 12:31:06 -0800 |
commit | 717d44e849219781ced028a40fcc59d3e1f49e4c (patch) | |
tree | aa34a9b84377d18ff58901cc342b84c7e8b81dca /fs/nfs/dir.c | |
parent | bde8f00ce64d9824a4f227c8594e335a1a10d044 (diff) |
[PATCH] NFS: Fix races in nfs_revalidate_mapping()
Prevent the call to invalidate_inode_pages2() from racing with file writes
by taking the inode->i_mutex across the page cache flush and invalidate.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index dee3d6c0f194..d9ba8cb0ee75 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -532,7 +532,7 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir) lock_kernel(); - res = nfs_revalidate_mapping(inode, filp->f_mapping); + res = nfs_revalidate_mapping_nolock(inode, filp->f_mapping); if (res < 0) { unlock_kernel(); return res; |