]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc8cf513bc52d8363cf9ea84eba3b3ab4892b820e
tree0a5cad952f633ea706a463dcf42a255dc7c6f5e9
parent1544c17be026782fbd570733e9c2e1ccb34da59a
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