• Al Viro's avatar
    untangling do_lookup() - get rid of need_reval in !dentry case · 08b0ab7c
    Al Viro authored
    Everything arriving into if (!dentry) will have need_reval = 1.
    Indeed, the only way to get there with need_reval reset to 0 would
    be via
    	if (unlikely(d_need_lookup(dentry)))
    		goto unlazy;
    	if (unlikely(dentry->d_flags & DCACHE_OP_REVALIDATE)) {
    		status = d_revalidate(dentry, nd);
    	if (unlikely(status <= 0)) {
    		if (status != -ECHILD)
    			need_reval = 0;
    		goto unlazy;
    ...
    unlazy:
    	/* no assignments to dentry */
    	if (dentry && unlikely(d_need_lookup(dentry))) {
    		dput(dentry);
    		dentry = NULL;
    	}
    and if d_need_lookup() had already been false the first time around, it
    will remain false on the second call as well.
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    08b0ab7c
namei.c 86.7 KB