linux/fs/overlayfs
NeilBrown 56c8fd738e
ovl: use is_subdir() for testing if one thing is a subdir of another
Rather than using lock_rename(), use the more obvious is_subdir() for
ensuring that neither upper nor workdir contain the other.
Also be explicit in the comment that the two directories cannot be the
same.

As this is a point-it-time sanity check and does not provide any
on-going guarantees, the removal of locking does not introduce any
interesting races.

Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: NeilBrown <neil@brown.name>
Link: https://patch.msgid.link/20260224222542.3458677-14-neilb@ownmail.net
Signed-off-by: Christian Brauner <brauner@kernel.org>
History 2026-03-09 09:43:03 +01:00
..
copy_up.c vfs-6.19-rc1.directory.locking 2025-12-01 16:13:46 -08:00
dir.c ovl: change ovl_create_real() to get a new lock when re-opening created file. 2026-03-09 09:43:03 +01:00
export.c ovl: Simplify ovl_lookup_real_one() 2026-03-06 10:24:12 +01:00
file.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
inode.c fs: add support for non-blocking timestamp updates 2026-01-12 14:01:33 +01:00
Kconfig fs: prepare for stackable filesystems backing file helpers 2023-12-23 16:35:08 +02:00
Makefile ovl: Move xattr support to new xattrs.c file 2023-10-31 00:12:59 +02:00
namei.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
overlayfs.h ovl: change ovl_create_real() to get a new lock when re-opening created file. 2026-03-09 09:43:03 +01:00
ovl_entry.h ovl: Prepare for mounting case-insensitive enabled layers 2025-09-23 12:29:35 +02:00
params.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
params.h ovl: Prepare for mounting case-insensitive enabled layers 2025-09-23 12:29:35 +02:00
readdir.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
super.c ovl: use is_subdir() for testing if one thing is a subdir of another 2026-03-09 09:43:03 +01:00
util.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
xattrs.c ovl: port ovl_listxattr() to cred guard 2025-11-19 21:58:24 +01:00