linux-stable/fs/overlayfs
Al Viro 3c70569e17 new helper: lookup_positive_unlocked()
[ Upstream commit 6c2d4798a8 ]

Most of the callers of lookup_one_len_unlocked() treat negatives are
ERR_PTR(-ENOENT).  Provide a helper that would do just that.  Note
that a pinned positive dentry remains positive - it's ->d_inode is
stable, etc.; a pinned _negative_ dentry can become positive at any
point as long as you are not holding its parent at least shared.
So using lookup_one_len_unlocked() needs to be careful;
lookup_positive_unlocked() is safer and that's what the callers
end up open-coding anyway.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Stable-dep-of: 0d5a4f8f77 ("fs: Fix error checking for d_hash_and_lookup()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-23 10:47:59 +02:00
..
copy_up.c treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
dir.c ovl: Use ovl mounter's fsuid and fsgid in ovl_link() 2023-01-18 11:30:40 +01:00
export.c ovl: drop WARN_ON() dentry is NULL in ovl_encode_fh() 2022-08-25 11:14:54 +02:00
file.c ovl: fix unneeded call to ovl_change_flags() 2020-07-22 09:32:10 +02:00
inode.c ovl: perform vfs_getxattr() with mounter creds 2021-02-23 15:00:56 +01:00
Kconfig ovl: Provide a mount option metacopy=on/off for metadata copyup 2018-07-20 09:56:06 +02:00
Makefile ovl: stack file ops 2018-07-18 15:44:41 +02:00
namei.c new helper: lookup_positive_unlocked() 2023-09-23 10:47:59 +02:00
overlayfs.h ovl: fix warning in ovl_create_real() 2021-12-22 09:19:04 +01:00
ovl_entry.h ovl: fix regression caused by overlapping layers detection 2019-09-21 07:17:14 +02:00
readdir.c ovl: fix wrong WARN_ON() in ovl_cache_update_ino() 2020-02-11 04:34:02 -08:00
super.c ovl: fix warning in ovl_create_real() 2021-12-22 09:19:04 +01:00
util.c ovl: detect overlapping layers 2019-06-25 11:35:52 +08:00