mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: Shaohua Li <shaohua.li@intel.com>
Cc: linux-kernel@vger.kernel.org, rjw@sisk.pl
Subject: Re: nfs regression 2.6.35+
Date: Mon, 16 Aug 2010 18:47:34 -0400	[thread overview]
Message-ID: <1281998854.3577.84.camel@heimdal.trondhjem.org> (raw)
In-Reply-To: <20100816070626.GA10503@sli10-desk.sh.intel.com>

On Mon, 2010-08-16 at 15:06 +0800, Shaohua Li wrote:
> NFS client runs latest git. At client side, use vim to edit a file located at
> NFS server. If I save the file, vim always reports 'E667: Fsync failed'. If I
> revert f7fa16506bf9b6323e862a61e14c20555152bb3, vim works. No kernel errors
> reported.
> 
> Thanks,
> Shaohua
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

There is already a fix for this in the linux-next tree and in the
'bugfixes' branch of
git://git.linux-nfs.org/projects/trondmy/nfs-2.6.git: see commit
0702099bd86c33c2dcdbd3963433a61f3f503901 (NFS: fix the return value of
nfs_file_fsync()).

I haven't pushed it to Linus yet due to excessive travel this past week.
Will do so soon.

Cheers
  Trond

----------------------------------------------------------------------------------------
commit 0702099bd86c33c2dcdbd3963433a61f3f503901
Author: J. R. Okajima <hooanon05@yahoo.co.jp>
Date:   Wed Aug 11 13:10:16 2010 -0400

    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>
    Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

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;
 }


      parent reply	other threads:[~2010-08-16 22:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-16  7:06 Shaohua Li
2010-08-16 10:09 ` Takashi Iwai
2010-08-16 10:40   ` Takashi Iwai
2010-08-16 16:35     ` Bill Davidsen
2010-08-16 18:17     ` Nick Bowler
2010-08-16 22:47 ` Trond Myklebust [this message]

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=1281998854.3577.84.camel@heimdal.trondhjem.org \
    --to=trond.myklebust@netapp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=shaohua.li@intel.com \
    /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

all inboxes | Powered by JetHome®