diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2021-05-12 16:21:43 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2021-05-18 20:15:56 -0400 |
commit | 2dac0ad17598d1e54a264ed9286fa7bdbd75a97b (patch) | |
tree | 6759819910cd2f6ed50a738f5dd1a78534702511 /fs/d_path.c | |
parent | 7c0d552fd5aa3527ed01290832ebbe072fa5de52 (diff) | |
download | linux-2dac0ad17598d1e54a264ed9286fa7bdbd75a97b.tar.bz2 |
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>
Diffstat (limited to 'fs/d_path.c')
-rw-r--r-- | fs/d_path.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/d_path.c b/fs/d_path.c index 3836f5d0b023..9a0356cc98d3 100644 --- a/fs/d_path.c +++ b/fs/d_path.c @@ -115,7 +115,6 @@ restart: /* Escaped? */ if (dentry != mnt->mnt.mnt_root) { - b = *p; error = 3; break; } @@ -156,6 +155,9 @@ restart: } done_seqretry(&mount_lock, m_seq); + if (unlikely(error == 3)) + b = *p; + if (b.len == p->len) prepend(&b, "/", 1); |