]> 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)
commit1bbcf1347ab5b47ee3d5ab41ecb14cbfb97e5602
tree0a04fa39c8e16178e9665e6d412e4b2a4b470fdb
parent15bb9417c555a9b87945714e6df950a2d1444b75
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