]> Pileus Git - ~andy/linux/blobdiff - ipc/mqueue.c
drivers/gpio: represent gpio-nomadik as an IRQ controller in DT documentation
[~andy/linux] / ipc / mqueue.c
index 86ee272de210bbae8236d45a4cebda3021afe2e9..28bd64ddeda3f438742d5297e13da0269ad62609 100644 (file)
@@ -188,30 +188,20 @@ static int mqueue_fill_super(struct super_block *sb, void *data, int silent)
 {
        struct inode *inode;
        struct ipc_namespace *ns = data;
-       int error;
 
        sb->s_blocksize = PAGE_CACHE_SIZE;
        sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
        sb->s_magic = MQUEUE_MAGIC;
        sb->s_op = &mqueue_super_ops;
 
-       inode = mqueue_get_inode(sb, ns, S_IFDIR | S_ISVTX | S_IRWXUGO,
-                               NULL);
-       if (IS_ERR(inode)) {
-               error = PTR_ERR(inode);
-               goto out;
-       }
+       inode = mqueue_get_inode(sb, ns, S_IFDIR | S_ISVTX | S_IRWXUGO, NULL);
+       if (IS_ERR(inode))
+               return PTR_ERR(inode);
 
-       sb->s_root = d_alloc_root(inode);
-       if (!sb->s_root) {
-               iput(inode);
-               error = -ENOMEM;
-               goto out;
-       }
-       error = 0;
-
-out:
-       return error;
+       sb->s_root = d_make_root(inode);
+       if (!sb->s_root)
+               return -ENOMEM;
+       return 0;
 }
 
 static struct dentry *mqueue_mount(struct file_system_type *fs_type,