summaryrefslogtreecommitdiffstats
path: root/fs/pstore/inode.c
diff options
context:
space:
mode:
authorAl Viro2012-02-13 04:08:01 +0100
committerAl Viro2012-03-21 02:29:37 +0100
commit318ceed088497d1ca839b1172518ac4cc7096b82 (patch)
tree7dfd07bfb5e8c5d5dbb0ba4ea523f334c98c66bb /fs/pstore/inode.c
parentminixfs: switch to d_make_root() (diff)
downloadkernel-qcow2-linux-318ceed088497d1ca839b1172518ac4cc7096b82.tar.gz
kernel-qcow2-linux-318ceed088497d1ca839b1172518ac4cc7096b82.tar.xz
kernel-qcow2-linux-318ceed088497d1ca839b1172518ac4cc7096b82.zip
tidy up after d_make_root() conversion
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/pstore/inode.c')
-rw-r--r--fs/pstore/inode.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c
index ec7d1fb6f35a..f37c32b94525 100644
--- a/fs/pstore/inode.c
+++ b/fs/pstore/inode.c
@@ -278,9 +278,7 @@ fail:
int pstore_fill_super(struct super_block *sb, void *data, int silent)
{
- struct inode *inode = NULL;
- struct dentry *root;
- int err;
+ struct inode *inode;
save_mount_options(sb, data);
@@ -296,25 +294,17 @@ int pstore_fill_super(struct super_block *sb, void *data, int silent)
parse_options(data);
inode = pstore_get_inode(sb, NULL, S_IFDIR | 0755, 0);
- if (!inode) {
- err = -ENOMEM;
- goto fail;
- }
- /* override ramfs "dir" options so we catch unlink(2) */
- inode->i_op = &pstore_dir_inode_operations;
-
- root = d_make_root(inode);
- sb->s_root = root;
- if (!root) {
- err = -ENOMEM;
- goto fail;
+ if (inode) {
+ /* override ramfs "dir" options so we catch unlink(2) */
+ inode->i_op = &pstore_dir_inode_operations;
}
+ sb->s_root = d_make_root(inode);
+ if (!sb->s_root)
+ return -ENOMEM;
pstore_get_records(0);
return 0;
-fail:
- return err;
}
static struct dentry *pstore_mount(struct file_system_type *fs_type,