diff options
author | Richard Weinberger <richard@nod.at> | 2015-03-04 23:44:54 +0100 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2015-03-26 23:27:53 +0100 |
commit | b98b91029cf8a6defc6311d4018c44f3b05fbec7 (patch) | |
tree | 7100a22cd77997fef0f131440e0dd62d4e4a59a5 /fs/hostfs/hostfs_kern.c | |
parent | af6aa1b9cad7350d675fe3523ab062e0e4c829cb (diff) | |
download | linux-b98b91029cf8a6defc6311d4018c44f3b05fbec7.tar.gz linux-b98b91029cf8a6defc6311d4018c44f3b05fbec7.tar.bz2 linux-b98b91029cf8a6defc6311d4018c44f3b05fbec7.zip |
hostfs: No need to box and later unbox the file mode
There is really no point in having a function with 10
arguments.
Reported-by: Daniel Walter <d.walter@0x90.at>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/hostfs/hostfs_kern.c')
-rw-r--r-- | fs/hostfs/hostfs_kern.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index f82f98a517f7..e77da44a235c 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -582,10 +582,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_IRUSR, mode & S_IWUSR, mode & S_IXUSR, - mode & S_IRGRP, mode & S_IWGRP, mode & S_IXGRP, - mode & S_IROTH, mode & S_IWOTH, mode & S_IXOTH); + fd = file_create(name, mode & S_IFMT); if (fd < 0) error = fd; else |