From: Miklos Szeredi <miklos@szeredi.hu>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] FUSE: nfsd directory fsync fix
Date: Sun, 24 Apr 2005 17:26:45 +0200 [thread overview]
Message-ID: <E1DPj0P-0000NC-00@localhost> (raw)
This patch fixes an Oops which happens when nfsd calls fsync on a
directory with a NULL file argument. The solution is to just ignore
the fsync. Thanks to David Shaw for the bugreport.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
diff -rup linux-2.6.12-rc2-mm3/fs/fuse/dir.c linux-fuse/fs/fuse/dir.c
--- linux-2.6.12-rc2-mm3/fs/fuse/dir.c 2005-04-22 15:49:29.000000000 +0200
+++ linux-fuse/fs/fuse/dir.c 2005-04-22 15:50:32.000000000 +0200
@@ -590,7 +590,8 @@ static int fuse_dir_release(struct inode
static int fuse_dir_fsync(struct file *file, struct dentry *de, int datasync)
{
- return fuse_fsync_common(file, de, datasync, 1);
+ /* nfsd can call this with no file */
+ return file ? fuse_fsync_common(file, de, datasync, 1) : 0;
}
static unsigned iattr_to_fattr(struct iattr *iattr, struct fuse_attr *fattr)
reply other threads:[~2005-04-24 15:27 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=E1DPj0P-0000NC-00@localhost \
--to=miklos@szeredi.hu \
--cc=akpm@osdl.org \
--cc=linux-kernel@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