]> git.baikalelectronics.ru Git - kernel.git/commit
handle_mounts(): start building a sane wrapper for follow_managed()
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 9 Jan 2020 01:37:23 +0000 (20:37 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 27 Feb 2020 19:43:56 +0000 (14:43 -0500)
commitc2cc6a0420c5fdd8597aa5f0d03e786ab7a132c3
tree0a04fa39c8e16178e9665e6d412e4b2a4b470fdb
parent4d11629b8f9acfde80e23009ec9494964221e688
handle_mounts(): start building a sane wrapper for follow_managed()

All callers of follow_managed() follow it on success with the same steps -
d_backing_inode(path->dentry) is calculated and stored into some struct inode *
variable and, in all but one case, an unsigned variable (nd->seq to be) is
zeroed.  The single exception is lookup_fast() and there zeroing is correct
thing to do - not doing it is a pointless microoptimization.

Add a wrapper for follow_managed() that would do that combination.
It's mostly a vehicle for code massage - it will be changing quite a bit,
and the current calling conventions are by no means final.  Right now it
takes path, nameidata and (as out params) inode and seq, similar to
__follow_mount_rcu().  Which will soon get folded into it...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c