kernfs: remove an unused if statement in kernfs_path_from_node_locked()
PATCH v2 1/1 kernfs: remove an unused if statement in kernfs_path_from_node_locked()
It makes no sense to call kernfs_path_from_node_locked() with NULL buf, and no one is doing that right now.
Suggested-by Tejun Heo <[email protected]>
Signed-off-by Zhen Lei <[email protected]>
--- fs/kernfs/dir.c | 3 --- 1 file changed, 3 deletions(-)
fs/kernfs/dir.c +0 -3
@@ -149,9 +149,6 @@ static int kernfs_path_from_node_locked(struct kernfs_node *kn_to,if (kn_from == kn_to)return strlcpy (buf,"/" , buflen); -if (!buf) -return -EINVAL ; - common =kernfs_common_ancestor (kn_from, kn_to);if (WARN_ON (!common))return -EINVAL ;
Signature · 1 line
2.25.1
Quoted 5 lines · Zhen Lei
It makes no sense to call
kernfs_path_from_node_locked()with NULL buf, and no one is doing that right now.Suggested-by Tejun Heo <[email protected]>Signed-off-by Zhen Lei <[email protected]>
Acked-by Tejun Heo <[email protected]>
Thanks.
Signature · 1 line
tejun