Commit 2dac0ad1 authored by Al Viro's avatar Al Viro

d_path: prepend_path(): lift resetting b in case when we'd return 3 out of loop

preparation to extracting the loop into helper (next commit)
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 7c0d552f
......@@ -115,7 +115,6 @@ static int prepend_path(const struct path *path,
/* Escaped? */
if (dentry != mnt->mnt.mnt_root) {
b = *p;
error = 3;
break;
}
......@@ -156,6 +155,9 @@ static int prepend_path(const struct path *path,
}
done_seqretry(&mount_lock, m_seq);
if (unlikely(error == 3))
b = *p;
if (b.len == p->len)
prepend(&b, "/", 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment