summaryrefslogtreecommitdiff
path: root/ipc/mqueue.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-01-09 07:15:13 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-03-21 05:29:35 +0400
commit48fde701aff662559b38d9a609574068f22d00fe (patch)
treeaa6b203dc671b51d58575b65eb08310ff8309b60 /ipc/mqueue.c
parent6b4231e2f92adbcf96fb2a3fa751d7ca0a61b21f (diff)
downloadlinux-48fde701aff662559b38d9a609574068f22d00fe.tar.xz
switch open-coded instances of d_make_root() to new helper
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'ipc/mqueue.c')
-rw-r--r--ipc/mqueue.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 86ee272de210..28bd64ddeda3 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -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,