Commit:     634707388baa440d9c9d082cfc4c950500c8952b
Parent:     89a09141df6ac1c3821fbe44ca8384eb37692965
Author:     Trond Myklebust <[EMAIL PROTECTED]>
AuthorDate: Fri Mar 16 13:38:28 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Mar 16 19:25:06 2007 -0700

    [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 <[EMAIL PROTECTED]>
    Acked-by: Olof Johansson <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 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 af53c02..93d046c 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)
        int err;
        /* Flush out writes to the server in order to update c/mtime */
-       nfs_sync_mapping_range(inode->i_mapping, 0, 0, FLUSH_NOCOMMIT);
+       if (S_ISREG(inode->i_mode))
+               nfs_sync_mapping_range(inode->i_mapping, 0, 0, FLUSH_NOCOMMIT);
         * We may force a getattr if the user cares about atime.
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to