From: Christoph Hellwig <hch@lst.de>
To: bfields@fieldses.org, viro@zeniv.linux.org.uk, jack@suse.cz
Cc: linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/2] nfsd: make sure data is on disk before calling ->fsync
Date: Mon, 4 Jan 2010 14:50:45 +0100 [thread overview]
Message-ID: <20100104135045.GA18072@lst.de> (raw)
In-Reply-To: <20091225164445.GA4578@lst.de>
ping? this fixes a quite nasty issue introduced in 2.6.32, so we should
fix it ASAP (including backport to -stable)
On Fri, Dec 25, 2009 at 05:44:45PM +0100, Christoph Hellwig wrote:
> nfsd is not using vfs_fsync, so I missed it when changing the calling
> convention during the 2.6.32 window. This patch fixes it to not only
> start the data writeout, but also wait for it to complete before calling
> into ->fsync.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> Index: linux-2.6/fs/nfsd/vfs.c
> ===================================================================
> --- linux-2.6.orig/fs/nfsd/vfs.c 2009-12-25 17:21:32.371024157 +0100
> +++ linux-2.6/fs/nfsd/vfs.c 2009-12-25 17:31:39.644006085 +0100
> @@ -780,12 +780,9 @@ static inline int nfsd_dosync(struct fil
> int (*fsync) (struct file *, struct dentry *, int);
> int err;
>
> - err = filemap_fdatawrite(inode->i_mapping);
> + err = filemap_write_and_wait(inode->i_mapping);
> if (err == 0 && fop && (fsync = fop->fsync))
> err = fsync(filp, dp, 0);
> - if (err == 0)
> - err = filemap_fdatawait(inode->i_mapping);
> -
> return err;
> }
>
---end quoted text---
next prev parent reply other threads:[~2010-01-04 13:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-25 16:44 [PATCH 1/2] nfsd: make sure data is on disk before calling ->fsync Christoph Hellwig
2010-01-04 13:50 ` Christoph Hellwig [this message]
2010-01-04 20:42 ` J. Bruce Fields
2010-01-04 20:43 ` J. Bruce Fields
2010-01-05 15:22 ` Christoph Hellwig
2010-01-06 22:46 ` J. Bruce Fields
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=20100104135045.GA18072@lst.de \
--to=hch@lst.de \
--cc=bfields@fieldses.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.