]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/hostfs/hostfs_kern.c
hostfs: No need to box and later unbox the file mode
[mirror_ubuntu-artful-kernel.git] / fs / hostfs / hostfs_kern.c
index f82f98a517f77984b6f9e42e5b88dadf4f7aa06b..e77da44a235c94c06ea16832582ab6138e1a0083 100644 (file)
@@ -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