diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2007-05-23 13:57:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-23 20:14:11 -0700 |
commit | b9ba347f27f2508e3da023688d047e111cbbe2da (patch) | |
tree | 5b683379c5c485a0fd1e22cbd16f62626b07d665 /fs/fuse/dir.c | |
parent | c12b3c62513ecf95c979d5c1785f99562b9dd10d (diff) | |
download | linux-stable-b9ba347f27f2508e3da023688d047e111cbbe2da.tar.gz linux-stable-b9ba347f27f2508e3da023688d047e111cbbe2da.tar.bz2 linux-stable-b9ba347f27f2508e3da023688d047e111cbbe2da.zip |
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/dir.c')
-rw-r--r-- | fs/fuse/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 8890eba1db52..bd5a772d8ccf 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; |