mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
switch lookup_mnt()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
79ed022619
commit
1c755af4df
@ -702,7 +702,7 @@ static int __follow_mount(struct path *path)
|
|||||||
{
|
{
|
||||||
int res = 0;
|
int res = 0;
|
||||||
while (d_mountpoint(path->dentry)) {
|
while (d_mountpoint(path->dentry)) {
|
||||||
struct vfsmount *mounted = lookup_mnt(path->mnt, path->dentry);
|
struct vfsmount *mounted = lookup_mnt(path);
|
||||||
if (!mounted)
|
if (!mounted)
|
||||||
break;
|
break;
|
||||||
dput(path->dentry);
|
dput(path->dentry);
|
||||||
@ -718,7 +718,7 @@ static int __follow_mount(struct path *path)
|
|||||||
static void follow_mount(struct path *path)
|
static void follow_mount(struct path *path)
|
||||||
{
|
{
|
||||||
while (d_mountpoint(path->dentry)) {
|
while (d_mountpoint(path->dentry)) {
|
||||||
struct vfsmount *mounted = lookup_mnt(path->mnt, path->dentry);
|
struct vfsmount *mounted = lookup_mnt(path);
|
||||||
if (!mounted)
|
if (!mounted)
|
||||||
break;
|
break;
|
||||||
dput(path->dentry);
|
dput(path->dentry);
|
||||||
@ -735,7 +735,7 @@ int follow_down(struct path *path)
|
|||||||
{
|
{
|
||||||
struct vfsmount *mounted;
|
struct vfsmount *mounted;
|
||||||
|
|
||||||
mounted = lookup_mnt(path->mnt, path->dentry);
|
mounted = lookup_mnt(path);
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
dput(path->dentry);
|
dput(path->dentry);
|
||||||
mntput(path->mnt);
|
mntput(path->mnt);
|
||||||
|
@ -442,11 +442,11 @@ struct vfsmount *__lookup_mnt(struct vfsmount *mnt, struct dentry *dentry,
|
|||||||
* lookup_mnt increments the ref count before returning
|
* lookup_mnt increments the ref count before returning
|
||||||
* the vfsmount struct.
|
* the vfsmount struct.
|
||||||
*/
|
*/
|
||||||
struct vfsmount *lookup_mnt(struct vfsmount *mnt, struct dentry *dentry)
|
struct vfsmount *lookup_mnt(struct path *path)
|
||||||
{
|
{
|
||||||
struct vfsmount *child_mnt;
|
struct vfsmount *child_mnt;
|
||||||
spin_lock(&vfsmount_lock);
|
spin_lock(&vfsmount_lock);
|
||||||
if ((child_mnt = __lookup_mnt(mnt, dentry, 1)))
|
if ((child_mnt = __lookup_mnt(path->mnt, path->dentry, 1)))
|
||||||
mntget(child_mnt);
|
mntget(child_mnt);
|
||||||
spin_unlock(&vfsmount_lock);
|
spin_unlock(&vfsmount_lock);
|
||||||
return child_mnt;
|
return child_mnt;
|
||||||
|
@ -370,7 +370,7 @@ static inline int d_mountpoint(struct dentry *dentry)
|
|||||||
return dentry->d_mounted;
|
return dentry->d_mounted;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern struct vfsmount *lookup_mnt(struct vfsmount *, struct dentry *);
|
extern struct vfsmount *lookup_mnt(struct path *);
|
||||||
extern struct dentry *lookup_create(struct nameidata *nd, int is_dir);
|
extern struct dentry *lookup_create(struct nameidata *nd, int is_dir);
|
||||||
|
|
||||||
extern int sysctl_vfs_cache_pressure;
|
extern int sysctl_vfs_cache_pressure;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user