mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
switch open-coded instances of d_make_root() to new helper
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
6b4231e2f9
commit
48fde701af
64 changed files with 105 additions and 264 deletions
|
|
@ -210,7 +210,6 @@ int ramfs_fill_super(struct super_block *sb, void *data, int silent)
|
|||
{
|
||||
struct ramfs_fs_info *fsi;
|
||||
struct inode *inode = NULL;
|
||||
struct dentry *root;
|
||||
int err;
|
||||
|
||||
save_mount_options(sb, data);
|
||||
|
|
@ -234,14 +233,8 @@ int ramfs_fill_super(struct super_block *sb, void *data, int silent)
|
|||
sb->s_time_gran = 1;
|
||||
|
||||
inode = ramfs_get_inode(sb, NULL, S_IFDIR | fsi->mount_opts.mode, 0);
|
||||
if (!inode) {
|
||||
err = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
root = d_alloc_root(inode);
|
||||
sb->s_root = root;
|
||||
if (!root) {
|
||||
sb->s_root = d_make_root(inode);
|
||||
if (!sb->s_root) {
|
||||
err = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
|
|
@ -250,7 +243,6 @@ int ramfs_fill_super(struct super_block *sb, void *data, int silent)
|
|||
fail:
|
||||
kfree(fsi);
|
||||
sb->s_fs_info = NULL;
|
||||
iput(inode);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue