diff options
author | Richard Weinberger <richard@nod.at> | 2015-05-04 08:50:29 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2015-05-04 08:50:29 -0400 |
commit | a718c92219b35e8a75175fde85c4566ac5730273 (patch) | |
tree | 69b4b5ab9b19443b13c6368a39a91c3c78b9aa9c /fs | |
parent | 5ebe6afaf0057ac3eaeb98defd5456894b446d22 (diff) |
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 <markus.stenberg@iki.fi>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/hostfs/hostfs_kern.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index ef263174acd2..07d8d8f52faf 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, | |||
581 | if (name == NULL) | 581 | if (name == NULL) |
582 | goto out_put; | 582 | goto out_put; |
583 | 583 | ||
584 | fd = file_create(name, mode & S_IFMT); | 584 | fd = file_create(name, mode & 0777); |
585 | if (fd < 0) | 585 | if (fd < 0) |
586 | error = fd; | 586 | error = fd; |
587 | else | 587 | else |