All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] FUSE: nfsd directory fsync fix
@ 2005-04-24 15:26 Miklos Szeredi
  0 siblings, 0 replies; only message in thread
From: Miklos Szeredi @ 2005-04-24 15:26 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-04-24 15:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-24 15:26 [PATCH] FUSE: nfsd directory fsync fix Miklos Szeredi

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.