summaryrefslogtreecommitdiff
path: root/fs/d_path.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2021-05-12 23:24:12 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2021-05-19 03:15:56 +0300
commit7c0d552fd5aa3527ed01290832ebbe072fa5de52 (patch)
treec4b10830b547490a8953a9f0ba054d62dafe3982 /fs/d_path.c
parentad08ae586586ea9e2c0228a3d5a083500ea54202 (diff)
downloadlinux-7c0d552fd5aa3527ed01290832ebbe072fa5de52.tar.xz
d_path: prepend_path(): get rid of vfsmnt
it's kept equal to &mnt->mnt all along. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/d_path.c')
-rw-r--r--fs/d_path.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/d_path.c b/fs/d_path.c
index 06e93dd031bf..3836f5d0b023 100644
--- a/fs/d_path.c
+++ b/fs/d_path.c
@@ -90,7 +90,6 @@ static int prepend_path(const struct path *path,
struct prepend_buffer *p)
{
struct dentry *dentry;
- struct vfsmount *vfsmnt;
struct mount *mnt;
int error = 0;
unsigned seq, m_seq = 0;
@@ -105,18 +104,17 @@ restart:
b = *p;
error = 0;
dentry = path->dentry;
- vfsmnt = path->mnt;
- mnt = real_mount(vfsmnt);
+ mnt = real_mount(path->mnt);
read_seqbegin_or_lock(&rename_lock, &seq);
- while (dentry != root->dentry || vfsmnt != root->mnt) {
+ while (dentry != root->dentry || &mnt->mnt != root->mnt) {
struct dentry * parent;
- if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) {
+ if (dentry == mnt->mnt.mnt_root || IS_ROOT(dentry)) {
struct mount *parent = READ_ONCE(mnt->mnt_parent);
struct mnt_namespace *mnt_ns;
/* Escaped? */
- if (dentry != vfsmnt->mnt_root) {
+ if (dentry != mnt->mnt.mnt_root) {
b = *p;
error = 3;
break;
@@ -125,7 +123,6 @@ restart:
if (mnt != parent) {
dentry = READ_ONCE(mnt->mnt_mountpoint);
mnt = parent;
- vfsmnt = &mnt->mnt;
continue;
}
mnt_ns = READ_ONCE(mnt->mnt_ns);