diff options
author | NeilBrown <neilb@suse.de> | 2025-02-17 11:27:21 +1100 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-02-19 14:09:15 +0100 |
commit | 204a575e91f3dace7589db5d1ff00067094c1e29 (patch) | |
tree | af3811c151979d69bfb3999c069ef91167051f4d /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 1c3cb50b58c30e37d88d0b46aa093ce331f4678d (diff) |
VFS: add common error checks to lookup_one_qstr_excl()
Callers of lookup_one_qstr_excl() often check if the result is negative or
positive.
These changes can easily be moved into lookup_one_qstr_excl() by checking the
lookup flags:
LOOKUP_CREATE means it is NOT an error if the name doesn't exist.
LOOKUP_EXCL means it IS an error if the name DOES exist.
This patch adds these checks, then removes error checks from callers,
and ensures that appropriate flags are passed.
This subtly changes the meaning of LOOKUP_EXCL. Previously it could
only accompany LOOKUP_CREATE. Now it can accompany LOOKUP_RENAME_TARGET
as well. A couple of small changes are needed to accommodate this. The
NFS change is functionally a no-op but ensures nfs_is_exclusive_create() does
exactly what the name says.
Signed-off-by: NeilBrown <neilb@suse.de>
Link: https://lore.kernel.org/r/20250217003020.3170652-3-neilb@suse.de
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions