[part of "pnfs: layoutcommit"] Signed-off-by: Andy Adamson <andros@xxxxxxxxxx> Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxxx> --- fs/nfs/inode.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 979483f..8cdea1a 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -1212,6 +1212,14 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) server->fsid = fattr->fsid; /* + * file needs layout commit, server attributes may be stale + */ + if (layoutcommit_needed(nfsi) && nfsi->change_attr >= fattr->change_attr) { + dprintk("NFS: %s: layoutcommit is needed for file %s/%ld\n", + __func__, inode->i_sb->s_id, inode->i_ino); + return 0; + } + /* * Update the read time so we don't revalidate too often. */ nfsi->read_cache_jiffies = fattr->time_start; -- 1.7.2.3 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html