linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. R. Okajima" <hooanon05@yahoo.co.jp>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: Q. NFS, return value of close(2)
Date: Thu, 12 Aug 2010 02:04:24 +0900	[thread overview]
Message-ID: <7396.1281546264@jrobl> (raw)
In-Reply-To: <1281544299.3262.2.camel@heimdal.trondhjem.org>


Trond Myklebust:
> Yes. That looks correct. Can you resend with an appropriate signed-off
> line, etc.?

Sure.

----------------------------------------------------------------------
commit e56f956a08a6227004cd9b7747df6a089dbb3594
Author: J. R. Okajima <hooanon05@yahoo.co.jp>
Date:   Thu Aug 12 02:00:02 2010 +0900

    NFS: fix the return value of nfs_file_fsync()
    
    By the commit
    	af7fa16 2010-08-03 NFS: Fix up the fsync code
    close(2) became returning the non-zero value even if it went well.
    nfs_file_fsync() should return 0 when "status" is positive.
    
    Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 2d141a7..eb51bd6 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -323,7 +323,7 @@ nfs_file_fsync(struct file *file, int datasync)
 	have_error |= test_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags);
 	if (have_error)
 		ret = xchg(&ctx->error, 0);
-	if (!ret)
+	if (!ret && status < 0)
 		ret = status;
 	return ret;
 }

  reply	other threads:[~2010-08-11 17:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11 15:36 Q. NFS, return value of close(2) J. R. Okajima
2010-08-11 16:31 ` Trond Myklebust
2010-08-11 17:04   ` J. R. Okajima [this message]
2010-08-11 17:06     ` Trond Myklebust
2010-08-13 12:25       ` Milan Broz

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=7396.1281546264@jrobl \
    --to=hooanon05@yahoo.co.jp \
    --cc=Trond.Myklebust@netapp.com \
    --cc=linux-fsdevel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).