From: Richard Weinberger Date: Mon, 4 May 2015 12:50:29 +0000 (+0200) Subject: hostfs: Use correct mask for file mode X-Git-Tag: v4.14-rc1~5382^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a718c92219b35e8a75175fde85c4566ac5730273;p=platform%2Fkernel%2Flinux-rpi.git hostfs: Use correct mask for file mode 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 Signed-off-by: Richard Weinberger --- diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index ef26317..07d8d8f 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -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