]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
hostfs: Use correct mask for file mode
authorRichard Weinberger <richard@nod.at>
Mon, 4 May 2015 12:50:29 +0000 (14:50 +0200)
committerRichard Weinberger <richard@nod.at>
Mon, 4 May 2015 12:50:29 +0000 (14:50 +0200)
S_IFMT is obviously wrong and needs to be 0777.
We're interested in the file mode, not the type.

Fixes: b98b91029c (hostfs: No need to box and later unbox the file mode)
Reported-by: Markus Stenberg <markus.stenberg@iki.fi>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/hostfs/hostfs_kern.c

index ef263174acd23a88f2a110b80a67afc2fab2ddc0..07d8d8f52faf50d027f2f90a1699c7afa274aa34 100644 (file)
@@ -581,7 +581,7 @@ static int hostfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
        if (name == NULL)
                goto out_put;
 
-       fd = file_create(name, mode & S_IFMT);
+       fd = file_create(name, mode & 0777);
        if (fd < 0)
                error = fd;
        else