summaryrefslogtreecommitdiff
path: root/fs/fs_parser.c
diff options
context:
space:
mode:
authorStephen Brennan <stephen.s.brennan@oracle.com>2021-09-01 10:51:42 -0700
committerAl Viro <viro@zeniv.linux.org.uk>2021-09-07 16:07:47 -0400
commit794ebcea865bff47231de89269e9d542121ab7be (patch)
tree0a5cad952f633ea706a463dcf42a255dc7c6f5e9 /fs/fs_parser.c
parentc5f563f9e9e66c0ad0b23abe25165c124579b70e (diff)
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>
Diffstat (limited to 'fs/fs_parser.c')
-rw-r--r--fs/fs_parser.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/fs_parser.c b/fs/fs_parser.c
index 980d44fd3a36..3df07c0e32b3 100644
--- a/fs/fs_parser.c
+++ b/fs/fs_parser.c
@@ -165,7 +165,6 @@ int fs_lookup_param(struct fs_context *fc,
return invalf(fc, "%s: not usable as path", param->key);
}
- f->refcnt++; /* filename_lookup() drops our ref. */
ret = filename_lookup(param->dirfd, f, flags, _path, NULL);
if (ret < 0) {
errorf(fc, "%s: Lookup failure for '%s'", param->key, f->name);