From b98b91029cf8a6defc6311d4018c44f3b05fbec7 Mon Sep 17 00:00:00 2001 From: Richard Weinberger Date: Wed, 4 Mar 2015 23:44:54 +0100 Subject: 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 Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs_kern.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'fs/hostfs/hostfs_kern.c') 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 -- cgit v1.2.3