From 3c928e921797b9b544f97c9f282c7333539073c9 Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Sat, 16 Oct 2010 22:07:46 -0700 Subject: [PATCH] --- yaml --- r: 253928 b: refs/heads/master c: 0f66b5984df2fe1617c05900a39a7ef493ca9de9 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/nfs/inode.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index c7cf6b71ea84..c14fdb8802a0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0b760113a3a155269a3fba93a409c640031dd68f +refs/heads/master: 0f66b5984df2fe1617c05900a39a7ef493ca9de9 diff --git a/trunk/fs/nfs/inode.c b/trunk/fs/nfs/inode.c index 144f2a3c7185..3f1eb8180373 100644 --- a/trunk/fs/nfs/inode.c +++ b/trunk/fs/nfs/inode.c @@ -1294,7 +1294,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) if (new_isize != cur_isize) { /* Do we perhaps have any outstanding writes, or has * the file grown beyond our last write? */ - if (nfsi->npages == 0 || new_isize > cur_isize) { + if ((nfsi->npages == 0 && !test_bit(NFS_INO_LAYOUTCOMMIT, &nfsi->flags)) || + new_isize > cur_isize) { i_size_write(inode, new_isize); invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA; }