[PATCH 11/14] d_path: prepend_path(): lift resetting b in case when we'd return 3 out of loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



preparation to extracting the loop into helper (next commit)

Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
---
 fs/d_path.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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 @@ 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);
 
-- 
2.11.0




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux