Linux NFS development
 help / color / mirror / Atom feed
From: Jiang Guiqing <jianggq@cn.fujitsu.com>
To: nfs@lists.sourceforge.net, linux-nfs@vger.kernel.org,
	nfsv4@linux-nfs.org
Subject: [PATCH] nfs_updatepage must not extend the write
Date: Mon, 10 Mar 2008 14:07:44 +0800	[thread overview]
Message-ID: <47D4D030.9060906@cn.fujitsu.com> (raw)

hi,all

I think, when mounting nfs with sync option, nfs_updatepage must not
extend the write to cover the entire page.

Signed-off-by: Jiang Guiqing <jianggq@cn.fujitsu.com>

---
  linux-2.6.25-rc4/fs/nfs/write.c |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/linux-2.6.25-rc4/fs/nfs/write.c b/linux-2.6.25-rc4/fs/nfs/write.c
index 80c61fd..94d6aaf 100644
--- a/linux-2.6.25-rc4/fs/nfs/write.c
+++ b/linux-2.6.25-rc4/fs/nfs/write.c
@@ -734,7 +734,8 @@ int nfs_updatepage(struct file *file, struct page *page,
  	 */
  	if (nfs_write_pageuptodate(page, inode) &&
  			inode->i_flock == NULL &&
-			!(file->f_flags & O_SYNC)) {
+			!(file->f_flags & O_SYNC) &&
+			!(IS_SYNC(inode))) {
  		count = max(count + offset, nfs_page_length(page));
  		offset = 0;
  	}
-- 
1.5.3.8

Thanks.
-Jiang Guiqing


                 reply	other threads:[~2008-03-10  6:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47D4D030.9060906@cn.fujitsu.com \
    --to=jianggq@cn.fujitsu.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=nfs@lists.sourceforge.net \
    --cc=nfsv4@linux-nfs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox