mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 02:36:02 +00:00
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: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
7c0d552fd5
commit
2dac0ad175
@ -115,7 +115,6 @@ static int prepend_path(const struct path *path,
|
|||||||
|
|
||||||
/* Escaped? */
|
/* Escaped? */
|
||||||
if (dentry != mnt->mnt.mnt_root) {
|
if (dentry != mnt->mnt.mnt_root) {
|
||||||
b = *p;
|
|
||||||
error = 3;
|
error = 3;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -156,6 +155,9 @@ static int prepend_path(const struct path *path,
|
|||||||
}
|
}
|
||||||
done_seqretry(&mount_lock, m_seq);
|
done_seqretry(&mount_lock, m_seq);
|
||||||
|
|
||||||
|
if (unlikely(error == 3))
|
||||||
|
b = *p;
|
||||||
|
|
||||||
if (b.len == p->len)
|
if (b.len == p->len)
|
||||||
prepend(&b, "/", 1);
|
prepend(&b, "/", 1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user