mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
tidy up after d_make_root() conversion
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
ca85c07809
commit
318ceed088
6 changed files with 26 additions and 53 deletions
|
@ -209,21 +209,19 @@ static int ramfs_parse_options(char *data, struct ramfs_mount_opts *opts)
|
|||
int ramfs_fill_super(struct super_block *sb, void *data, int silent)
|
||||
{
|
||||
struct ramfs_fs_info *fsi;
|
||||
struct inode *inode = NULL;
|
||||
struct inode *inode;
|
||||
int err;
|
||||
|
||||
save_mount_options(sb, data);
|
||||
|
||||
fsi = kzalloc(sizeof(struct ramfs_fs_info), GFP_KERNEL);
|
||||
sb->s_fs_info = fsi;
|
||||
if (!fsi) {
|
||||
err = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
if (!fsi)
|
||||
return -ENOMEM;
|
||||
|
||||
err = ramfs_parse_options(data, &fsi->mount_opts);
|
||||
if (err)
|
||||
goto fail;
|
||||
return err;
|
||||
|
||||
sb->s_maxbytes = MAX_LFS_FILESIZE;
|
||||
sb->s_blocksize = PAGE_CACHE_SIZE;
|
||||
|
@ -234,16 +232,10 @@ int ramfs_fill_super(struct super_block *sb, void *data, int silent)
|
|||
|
||||
inode = ramfs_get_inode(sb, NULL, S_IFDIR | fsi->mount_opts.mode, 0);
|
||||
sb->s_root = d_make_root(inode);
|
||||
if (!sb->s_root) {
|
||||
err = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
if (!sb->s_root)
|
||||
return -ENOMEM;
|
||||
|
||||
return 0;
|
||||
fail:
|
||||
kfree(fsi);
|
||||
sb->s_fs_info = NULL;
|
||||
return err;
|
||||
}
|
||||
|
||||
struct dentry *ramfs_mount(struct file_system_type *fs_type,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue