diff options
author | Trond Myklebust <trond.myklebust@fys.uio.no> | 2007-03-16 17:38:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-16 22:25:06 -0400 |
commit | 634707388baa440d9c9d082cfc4c950500c8952b (patch) | |
tree | 0d3075c34a69a2d4c5c3d5682fd6a0d26bff28e9 /fs/nfs | |
parent | 89a09141df6ac1c3821fbe44ca8384eb37692965 (diff) |
[PATCH] nfs: nfs_getattr() can't call nfs_sync_mapping_range() for non-regular files
Looks like we need a check in nfs_getattr() for a regular file. It makes
no sense to call nfs_sync_mapping_range() on anything else. I think that
should fix your problem: it will stop the NFS client from interfering
with dirty pages on that inode's mapping.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Acked-by: Olof Johansson <olof@lixom.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/inode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index af53c02f473b..93d046c85f52 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -429,7 +429,8 @@ int nfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) | |||
429 | int err; | 429 | int err; |
430 | 430 | ||
431 | /* Flush out writes to the server in order to update c/mtime */ | 431 | /* Flush out writes to the server in order to update c/mtime */ |
432 | nfs_sync_mapping_range(inode->i_mapping, 0, 0, FLUSH_NOCOMMIT); | 432 | if (S_ISREG(inode->i_mode)) |
433 | nfs_sync_mapping_range(inode->i_mapping, 0, 0, FLUSH_NOCOMMIT); | ||
433 | 434 | ||
434 | /* | 435 | /* |
435 | * We may force a getattr if the user cares about atime. | 436 | * We may force a getattr if the user cares about atime. |