mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 17:23:55 +08:00
vfs: do_dentry_open(): don't put filp
Move put_filp() out to __dentry_open(), the only caller now. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
90ad1a8ecb
commit
78f71eff3c
@ -747,7 +747,6 @@ cleanup_all:
|
|||||||
f->f_path.dentry = NULL;
|
f->f_path.dentry = NULL;
|
||||||
f->f_path.mnt = NULL;
|
f->f_path.mnt = NULL;
|
||||||
cleanup_file:
|
cleanup_file:
|
||||||
put_filp(f);
|
|
||||||
dput(dentry);
|
dput(dentry);
|
||||||
mntput(mnt);
|
mntput(mnt);
|
||||||
return ERR_PTR(error);
|
return ERR_PTR(error);
|
||||||
@ -765,6 +764,8 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt,
|
|||||||
fput(res);
|
fput(res);
|
||||||
res = ERR_PTR(error);
|
res = ERR_PTR(error);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
put_filp(f);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user