namei: Standardize callers of filename_lookup()
authorStephen Brennan <stephen.s.brennan@oracle.com>
Wed, 1 Sep 2021 17:51:42 +0000 (10:51 -0700)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 7 Sep 2021 20:07:47 +0000 (16:07 -0400)
commit794ebcea865bff47231de89269e9d542121ab7be
tree0a5cad952f633ea706a463dcf42a255dc7c6f5e9
parentc5f563f9e9e66c0ad0b23abe25165c124579b70e
namei: Standardize callers of filename_lookup()

filename_lookup() has two variants, one which drops the caller's
reference to filename (filename_lookup), and one which does
not (__filename_lookup). This can be confusing as it's unusual to drop a
caller's reference. Remove filename_lookup, rename __filename_lookup
to filename_lookup, and convert all callers. The cost is a few slightly
longer functions, but the clarity is greater.

[AV: consuming a reference is not at all unusual, actually; look at
e.g. do_mkdirat(), for example.  It's more that we want non-consuming
variant for close relative of that function...]

Link: https://lore.kernel.org/linux-fsdevel/YS+dstZ3xfcLxhoB@zeniv-ca.linux.org.uk/
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/fs_parser.c
fs/namei.c