summaryrefslogtreecommitdiffstats
path: root/fs/fuse
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2007-05-23 13:57:32 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-23 20:14:11 -0700
commitb9ba347f27f2508e3da023688d047e111cbbe2da (patch)
tree5b683379c5c485a0fd1e22cbd16f62626b07d665 /fs/fuse
parentc12b3c62513ecf95c979d5c1785f99562b9dd10d (diff)
downloadop-kernel-dev-b9ba347f27f2508e3da023688d047e111cbbe2da.zip
op-kernel-dev-b9ba347f27f2508e3da023688d047e111cbbe2da.tar.gz
fuse: fix mknod of regular file
The wrong lookup flag was tested in ->create() causing havoc (error or Oops) when a regular file was created with mknod() in a fuse filesystem. Thanks to J. Cameijo Cerdeira for the report. Kernels 2.6.18 onward are affected. Please apply to -stable as well. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fuse')
-rw-r--r--fs/fuse/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 8890eba..bd5a772 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -485,7 +485,7 @@ static int fuse_mknod(struct inode *dir, struct dentry *entry, int mode,
static int fuse_create(struct inode *dir, struct dentry *entry, int mode,
struct nameidata *nd)
{
- if (nd && (nd->flags & LOOKUP_CREATE)) {
+ if (nd && (nd->flags & LOOKUP_OPEN)) {
int err = fuse_create_open(dir, entry, mode, nd);
if (err != -ENOSYS)
return err;
OpenPOWER on IntegriCloud