summaryrefslogtreecommitdiffstats
path: root/arch/parisc/hpux/sys_hpux.c
diff options
context:
space:
mode:
authorAl Viro2011-03-11 10:44:53 +0100
committerAl Viro2011-03-14 14:15:27 +0100
commit5a18fff2090c3af830d699c8ccb230498a1e37e5 (patch)
tree388675113818a8d14e7cd7dc25185e1be55354f9 /arch/parisc/hpux/sys_hpux.c
parentpath_openat: clean ELOOP handling a bit (diff)
downloadkernel-qcow2-linux-5a18fff2090c3af830d699c8ccb230498a1e37e5.tar.gz
kernel-qcow2-linux-5a18fff2090c3af830d699c8ccb230498a1e37e5.tar.xz
kernel-qcow2-linux-5a18fff2090c3af830d699c8ccb230498a1e37e5.zip
untangle do_lookup()
That thing has devolved into rats nest of gotos; sane use of unlikely() gets rid of that horror and gives much more readable structure: * make a fast attempt to find a dentry; false negatives are OK. In RCU mode if everything went fine, we are done, otherwise just drop out of RCU. If we'd done (RCU) ->d_revalidate() and it had not refused outright (i.e. didn't give us -ECHILD), remember its result. * now we are not in RCU mode and hopefully have a dentry. If we do not, lock parent, do full d_lookup() and if that has not found anything, allocate and call ->lookup(). If we'd done that ->lookup(), remember that dentry is good and we don't need to revalidate it. * now we have a dentry. If it has ->d_revalidate() and we can't skip it, call it. * hopefully dentry is good; if not, either fail (in case of error) or try to invalidate it. If d_invalidate() has succeeded, drop it and retry everything as if original attempt had not found a dentry. * now we can finish it up - deal with mountpoint crossing and automount. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/parisc/hpux/sys_hpux.c')
0 files changed, 0 insertions, 0 deletions