[PATCH] walk_component(): get inode in lookup_slow branch statement block

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

 



The inode variable is used as a parameter by the step_into function,
but is not assigned a value in the sub-lookup_slow branch path. So
get the inode in the sub-lookup_slow branch path.

Signed-off-by: sunliming <sunliming@xxxxxxxxxx>
---
 fs/namei.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/namei.c b/fs/namei.c
index 1f28d3f463c3..a1a3e9514f46 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2014,6 +2014,8 @@ static const char *walk_component(struct nameidata *nd, int flags)
 		dentry = lookup_slow(&nd->last, nd->path.dentry, nd->flags);
 		if (IS_ERR(dentry))
 			return ERR_CAST(dentry);
+
+		inode = d_backing_inode(dentry);
 	}
 	if (!(flags & WALK_MORE) && nd->depth)
 		put_link(nd);
-- 
2.25.1




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

  Powered by Linux