ANDROID: sdcardfs: d_make_root calls iput
d_make_root will call iput on failure, so we shouldn't try to do that ourselves. Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 77923821 Change-Id: I1abb4afb0f894ab917b7c6be8c833676f436beb7
This commit is contained in:
parent
91c9270d11
commit
fedb4f1f60
1 changed files with 1 additions and 3 deletions
|
@ -316,7 +316,7 @@ static int sdcardfs_read_super(struct vfsmount *mnt, struct super_block *sb,
|
||||||
sb->s_root = d_make_root(inode);
|
sb->s_root = d_make_root(inode);
|
||||||
if (!sb->s_root) {
|
if (!sb->s_root) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto out_iput;
|
goto out_sput;
|
||||||
}
|
}
|
||||||
d_set_d_op(sb->s_root, &sdcardfs_ci_dops);
|
d_set_d_op(sb->s_root, &sdcardfs_ci_dops);
|
||||||
|
|
||||||
|
@ -361,8 +361,6 @@ static int sdcardfs_read_super(struct vfsmount *mnt, struct super_block *sb,
|
||||||
/* no longer needed: free_dentry_private_data(sb->s_root); */
|
/* no longer needed: free_dentry_private_data(sb->s_root); */
|
||||||
out_freeroot:
|
out_freeroot:
|
||||||
dput(sb->s_root);
|
dput(sb->s_root);
|
||||||
out_iput:
|
|
||||||
iput(inode);
|
|
||||||
out_sput:
|
out_sput:
|
||||||
/* drop refs we took earlier */
|
/* drop refs we took earlier */
|
||||||
atomic_dec(&lower_sb->s_active);
|
atomic_dec(&lower_sb->s_active);
|
||||||
|
|
Loading…
Reference in a new issue