aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index ecc0742..5d34f80 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -37,6 +37,7 @@
#include <linux/rculist_bl.h>
#include <linux/prefetch.h>
#include "internal.h"
+#include "mount.h"
/*
* Usage:
@@ -2519,9 +2520,8 @@ static int prepend_path(const struct path *path,
if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) {
/* Global root? */
- if (vfsmnt->mnt_parent == vfsmnt) {
+ if (!mnt_has_parent(vfsmnt))
goto global_root;
- }
dentry = vfsmnt->mnt_mountpoint;
vfsmnt = vfsmnt->mnt_parent;
continue;
@@ -2921,7 +2921,7 @@ int path_is_under(struct path *path1, struct path *path2)
br_read_lock(vfsmount_lock);
if (mnt != path2->mnt) {
for (;;) {
- if (mnt->mnt_parent == mnt) {
+ if (!mnt_has_parent(mnt)) {
br_read_unlock(vfsmount_lock);
return 0;
}