···705705}706706707707/**708708- * unlazy_child - try to switch to ref-walk mode.708708+ * try_to_unlazy_next - try to switch to ref-walk mode.709709 * @nd: nameidata pathwalk data710710- * @dentry: child of nd->path.dentry711711- * @seq: seq number to check dentry against712712- * Returns: 0 on success, -ECHILD on failure710710+ * @dentry: next dentry to step into711711+ * @seq: seq number to check @dentry against712712+ * Returns: true on success, false on failure713713 *714714- * unlazy_child attempts to legitimize the current nd->path, nd->root and dentry715715- * for ref-walk mode. @dentry must be a path found by a do_lookup call on716716- * @nd. Must be called from rcu-walk context.717717- * Nothing should touch nameidata between unlazy_child() failure and714714+ * Similar to to try_to_unlazy(), but here we have the next dentry already715715+ * picked by rcu-walk and want to legitimize that in addition to the current716716+ * nd->path and nd->root for ref-walk mode. Must be called from rcu-walk context.717717+ * Nothing should touch nameidata between try_to_unlazy_next() failure and718718 * terminate_walk().719719 */720720-static int unlazy_child(struct nameidata *nd, struct dentry *dentry, unsigned seq)720720+static bool try_to_unlazy_next(struct nameidata *nd, struct dentry *dentry, unsigned seq)721721{722722 BUG_ON(!(nd->flags & LOOKUP_RCU));723723···747747 if (unlikely(!legitimize_root(nd)))748748 goto out_dput;749749 rcu_read_unlock();750750- return 0;750750+ return true;751751752752out2:753753 nd->path.mnt = NULL;···755755 nd->path.dentry = NULL;756756out:757757 rcu_read_unlock();758758- return -ECHILD;758758+ return false;759759out_dput:760760 rcu_read_unlock();761761 dput(dentry);762762- return -ECHILD;762762+ return false;763763}764764765765static inline int d_revalidate(struct dentry *dentry, unsigned int flags)···13721372 return -ENOENT;13731373 if (likely(__follow_mount_rcu(nd, path, inode, seqp)))13741374 return 0;13751375- if (unlazy_child(nd, dentry, seq))13751375+ if (!try_to_unlazy_next(nd, dentry, seq))13761376 return -ECHILD;13771377 // *path might've been clobbered by __follow_mount_rcu()13781378 path->mnt = nd->path.mnt;···14931493 status = d_revalidate(dentry, nd->flags);14941494 if (likely(status > 0))14951495 return dentry;14961496- if (unlazy_child(nd, dentry, seq))14961496+ if (!try_to_unlazy_next(nd, dentry, seq))14971497 return ERR_PTR(-ECHILD);14981498 if (status == -ECHILD)14991499 /* we'd been told to redo it in non-rcu mode */