Merge branch develop-3.10
[firefly-linux-kernel-4.4.55.git] / fs / hostfs / hostfs_kern.c
index 0f6e52d22b8420fdbd3e5b315fe403d742c0a52f..32f35f18798902de1eb9b26d320dfe042cad7ff4 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <linux/fs.h>
+#include <linux/magic.h>
 #include <linux/module.h>
 #include <linux/mm.h>
 #include <linux/pagemap.h>
@@ -45,8 +46,6 @@ static const struct dentry_operations hostfs_dentry_ops = {
 static char *root_ino = "";
 static int append = 0;
 
-#define HOSTFS_SUPER_MAGIC 0x00c0ffee
-
 static const struct inode_operations hostfs_iops;
 static const struct inode_operations hostfs_dir_iops;
 static const struct inode_operations hostfs_link_iops;
@@ -121,7 +120,7 @@ static char *dentry_name(struct dentry *dentry)
        if (!name)
                return NULL;
 
-       return __dentry_name(dentry, name); /* will unlock */
+       return __dentry_name(dentry, name);
 }
 
 static char *inode_name(struct inode *ino)
@@ -229,10 +228,11 @@ static struct inode *hostfs_alloc_inode(struct super_block *sb)
 {
        struct hostfs_inode_info *hi;
 
-       hi = kzalloc(sizeof(*hi), GFP_KERNEL);
+       hi = kmalloc(sizeof(*hi), GFP_KERNEL);
        if (hi == NULL)
                return NULL;
        hi->fd = -1;
+       hi->mode = 0;
        inode_init_once(&hi->vfs_inode);
        return &hi->vfs_inode;
 }