linux/fs
Al Viro eb028c3345 d_make_discardable(): warn if given a non-persistent dentry
At this point there are very few call chains that might lead to
d_make_discardable() on a dentry that hadn't been made persistent:
calls of simple_unlink() and simple_rmdir() in configfs and
apparmorfs.

Both filesystems do pin (part of) their contents in dcache, but
they are currently playing very unusual games with that.  Converting
them to more usual patterns might be possible, but it's definitely
going to be a long series of changes in both cases.

For now the easiest solution is to have both stop using simple_unlink()
and simple_rmdir() - that allows to make d_make_discardable() warn
when given a non-persistent dentry.

Rather than giving them full-blown private copies (with calls of
d_make_discardable() replaced with dput()), let's pull the parts of
simple_unlink() and simple_rmdir() that deal with timestamps and link
counts into separate helpers (__simple_unlink() and __simple_rmdir()
resp.) and have those used by configfs and apparmorfs.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2025-11-17 23:59:27 -05:00
..
9p Revert "fs/9p: Refresh metadata in d_revalidate for uncached mode too" 2025-10-22 14:25:27 +09:00
adfs vfs-6.17-rc1.mmap_prepare 2025-07-28 13:43:25 -07:00
affs vfs-6.17-rc1.mmap_prepare 2025-07-28 13:43:25 -07:00
afs Simplifying ->d_name audits, easy part. 2025-10-03 11:14:02 -07:00
autofs convert autofs 2025-11-16 01:35:05 -05:00
befs
bfs vfs-6.17-rc1.mmap_prepare 2025-07-28 13:43:25 -07:00
btrfs for-6.18-rc4-tag 2025-11-04 14:25:38 +09:00
cachefiles VFS: unify old_mnt_idmap and new_mnt_idmap in renamedata 2025-09-23 12:37:35 +02:00
ceph Some messenger improvements from Eric and Max, a patch to address the 2025-10-10 11:30:19 -07:00
coda vfs-6.17-rc1.mmap_prepare 2025-07-28 13:43:25 -07:00
configfs d_make_discardable(): warn if given a non-persistent dentry 2025-11-17 23:59:27 -05:00
cramfs Patch series in this pull request: 2025-10-02 18:44:54 -07:00
crypto fscrypt: fix left shift underflow when inode->i_blkbits > PAGE_SHIFT 2025-11-04 16:37:38 -08:00
debugfs debugfs: remove duplicate checks in callers of start_creating() 2025-11-16 01:35:03 -05:00
devpts convert devpts 2025-11-16 01:35:04 -05:00
dlm dlm for 6.18 2025-09-29 15:24:58 -07:00
ecryptfs mount-related stuff for this cycle 2025-10-03 10:19:44 -07:00
efivarfs convert efivarfs 2025-11-16 01:35:04 -05:00
efs
erofs erofs: consolidate z_erofs_extent_lookback() 2025-10-22 07:54:31 +08:00
exfat exfat: fix out-of-bounds in exfat_nls_to_ucs2() 2025-10-15 17:53:20 +09:00
exportfs exportfs: use lookup_one_unlocked() 2025-06-11 13:44:15 +02:00
ext2 \n 2025-07-28 16:16:09 -07:00
ext4 Ext4 bug fixes for 6.18-rc2, including 2025-10-15 07:51:57 -07:00
f2fs f2fs: fix wrong block mapping for multi-devices 2025-10-13 23:55:44 +00:00
fat vfat: remove unused variable 2025-09-13 17:32:47 -07:00
freevxfs
fuse convert fuse_ctl 2025-11-16 01:35:03 -05:00
gfs2 finish_no_open calling conventions change 2025-10-03 10:59:31 -07:00
hfs hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
hfsplus hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
hostfs fs: rename generic_delete_inode() and generic_drop_inode() 2025-09-15 16:09:42 +02:00
hpfs - Avoid -Wflex-array-member-not-at-end warnings 2025-10-10 14:06:02 -07:00
hugetlbfs convert hugetlbfs 2025-11-16 01:35:02 -05:00
iomap iomap: open code bio_iov_iter_get_bdev_pages 2025-10-07 08:05:44 -06:00
isofs Current exclusion rules for ->d_flags stores are rather unpleasant. 2025-07-28 09:17:57 -07:00
jbd2 jbd2: ensure that all ongoing I/O complete before freeing blocks 2025-10-10 13:10:06 -04:00
jffs2 mm: introduce memdesc_flags_t 2025-09-13 16:55:07 -07:00
jfs A few fixes and cleanups for JFS. 2025-10-03 13:54:23 -07:00
kernfs vfs-6.18-rc1.misc 2025-09-29 09:03:07 -07:00
lockd SUNRPC: Move the svc_rpcb_cleanup() call sites 2025-09-23 13:28:19 -04:00
minix minixfs: Verify inode mode when loading from disk 2025-08-19 13:30:46 +02:00
netfs vfs-6.18-rc1.workqueue 2025-09-29 10:27:17 -07:00
nfs NFS4: Fix state renewals missing after boot 2025-10-13 14:33:00 -04:00
nfs_common NFS/localio: nfs_uuid_put() fix the wake up after unlinking the file 2025-08-05 16:45:40 -07:00
nfsd convert nfsctl 2025-11-17 23:59:27 -05:00
nilfs2 Merge branch 'mm-hotfixes-stable' into mm-stable in order to pick up 2025-09-21 14:19:36 -07:00
nls
notify fs/notify: call exportfs_encode_fid with s_umount 2025-10-06 16:31:52 +02:00
ntfs3 ntfs3: stop using write_cache_pages 2025-09-13 16:55:13 -07:00
ocfs2 convert dlmfs 2025-11-16 01:35:03 -05:00
omfs vfs-6.17-rc1.mmap_prepare 2025-07-28 13:43:25 -07:00
openpromfs
orangefs orangefs: Two cleanups and a bug fix. 2025-10-03 13:59:56 -07:00
overlayfs ovl: remove redundant IOCB_DIO_CALLER_COMP clearing 2025-10-10 14:02:47 +02:00
proc procfs: make /self and /thread_self dentries persistent 2025-11-16 01:35:02 -05:00
pstore convert pstore 2025-11-16 01:35:03 -05:00
qnx4
qnx6
quota fs: replace use of system_unbound_wq with system_dfl_wq 2025-09-19 16:15:07 +02:00
ramfs convert ramfs and tmpfs 2025-11-16 01:35:02 -05:00
resctrl x86,fs/resctrl: Fix NULL pointer dereference with events force-disabled in mbm_event mode 2025-10-20 18:06:31 +02:00
romfs fs: replace mmap hook with .mmap_prepare for simple mappings 2025-06-19 13:56:59 +02:00
smb three smb client fixes 2025-11-08 10:17:30 -08:00
squashfs Patch series in this pull request: 2025-10-02 18:44:54 -07:00
sysfs sysfs: check visibility before changing group attribute ownership 2025-10-17 09:48:34 +02:00
tests
tracefs convert tracefs 2025-11-16 01:35:03 -05:00
ubifs Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
udf fs: udf: fix OOB read in lengthAllocDescs handling 2025-09-22 15:33:56 +02:00
ufs vfs-6.17-rc1.mmap_prepare 2025-07-28 13:43:25 -07:00
unicode
vboxsf simplify vboxsf_dir_atomic_open() 2025-09-16 23:59:38 -04:00
verity Optimize fsverity with 2-way interleaved hashing 2025-09-29 15:55:20 -07:00
xfs xfs: free xfs_busy_extents structure when no RT extents are queued 2025-11-06 08:59:19 +01:00
zonefs zonefs: correct some spelling mistakes 2025-08-12 11:59:27 +09:00
Kconfig Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
Kconfig.binfmt binfmt_elf: preserve original ELF e_flags for core dumps 2025-09-03 20:49:32 -07:00
Makefile Remove bcachefs core code 2025-09-29 13:43:52 -07:00
aio.c Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
anon_inodes.c module: Rename EXPORT_SYMBOL_GPL_FOR_MODULES to EXPORT_SYMBOL_FOR_MODULES 2025-08-11 16:16:36 +02:00
attr.c vfs: add ATTR_CTIME_SET flag 2025-09-21 19:24:50 -04:00
backing-file.c vfs-6.17-rc1.mmap_prepare 2025-07-28 13:43:25 -07:00
bad_inode.c
binfmt_elf.c binfmt_elf: preserve original ELF e_flags for core dumps 2025-09-03 20:49:32 -07:00
binfmt_elf_fdpic.c execve updates for v6.17 2025-07-28 17:11:40 -07:00
binfmt_flat.c
binfmt_misc.c convert binfmt_misc 2025-11-16 01:35:05 -05:00
binfmt_script.c
bpf_fs_kfuncs.c bpf...d_path(): constify path argument 2025-09-15 21:17:08 -04:00
buffer.c fs/buffer: fix use-after-free when call bh_read() helper 2025-08-19 13:51:28 +02:00
char_dev.c
compat_binfmt_elf.c
coredump.c coredump: fix core_pattern input validation 2025-10-07 13:12:46 +02:00
d_path.c fold fs_struct->{lock,seq} into a seqlock 2025-07-08 10:25:19 +02:00
dax.c dax: skip read lock assertion for read-only filesystems 2025-10-07 12:48:33 +02:00
dcache.c d_make_discardable(): warn if given a non-persistent dentry 2025-11-17 23:59:27 -05:00
direct-io.c Summary of significant series in this pull request: 2025-07-31 14:57:54 -07:00
drop_caches.c
eventfd.c
eventpoll.c eventpoll: Replace rwlock with spinlock 2025-09-05 15:51:24 +02:00
exec.c coredump: fix core_pattern input validation 2025-10-07 13:12:46 +02:00
fcntl.c fcntl: trim arguments 2025-09-26 10:21:23 +02:00
fhandle.c namespace-6.18-rc1 2025-09-29 11:20:29 -07:00
file.c fs: always return zero on success from replace_fd() 2025-08-11 14:52:25 +02:00
file_attr.c fs: return EOPNOTSUPP from file_setattr/file_getattr syscalls 2025-10-10 13:46:00 +02:00
file_table.c fs: update comment in init_file() 2025-10-07 12:48:33 +02:00
filesystems.c
fs-writeback.c vfs-6.18-rc1.writeback 2025-09-29 11:34:40 -07:00
fs_context.c change the calling conventions for vfs_parse_fs_string() 2025-09-04 15:20:51 -04:00
fs_parser.c
fs_pin.c
fs_struct.c fold fs_struct->{lock,seq} into a seqlock 2025-07-08 10:25:19 +02:00
fs_types.c
fsopen.c fscontext: do not consume log entries when returning -EMSGSIZE 2025-08-11 14:52:41 +02:00
init.c VFS: rename kern_path_locked() and related functions. 2025-09-23 12:37:36 +02:00
inode.c vfs-6.18-rc1.inode 2025-09-29 09:42:30 -07:00
internal.h get rid of kill_litter_super() 2025-11-17 23:59:27 -05:00
ioctl.c fs: remove vfs_ioctl export 2025-09-01 13:08:01 +02:00
kernel_read_file.c
libfs.c d_make_discardable(): warn if given a non-persistent dentry 2025-11-17 23:59:27 -05:00
locks.c locks: Remove the last reference to EXPORT_OP_ASYNC_LOCK. 2025-08-11 14:52:24 +02:00
mbcache.c
mnt_idmapping.c
mount.h mount-related stuff for this cycle 2025-10-03 10:19:44 -07:00
mpage.c mpage: convert do_mpage_readpage() to return void type 2025-09-21 14:22:16 -07:00
namei.c file->f_path constification 2025-10-03 16:32:36 -07:00
namespace.c vfs_parse_fs_string() stuff 2025-10-03 10:51:44 -07:00
nsfs.c nsfs: handle inode number mismatches gracefully in file handles 2025-10-07 12:48:33 +02:00
open.c file->f_path constification 2025-10-03 16:32:36 -07:00
pidfs.c file->f_path constification 2025-10-03 16:32:36 -07:00
pipe.c Add RWF_NOSIGNAL flag for pwritev2 2025-08-29 15:08:07 +02:00
pnode.c umount_tree(): take all victims out of propagation graph at once 2025-09-15 21:26:44 -04:00
pnode.h umount_tree(): take all victims out of propagation graph at once 2025-09-15 21:26:44 -04:00
posix_acl.c
proc_namespace.c ->mnt_devname is never NULL 2025-05-23 14:20:44 +02:00
read_write.c copy_file_range: limit size if in compat mode 2025-08-15 16:11:47 +02:00
readdir.c readdir: supply dir_context.count as readdir buffer size hint 2025-05-29 12:31:23 +02:00
remap_range.c
select.c fs: annotate suspected data race between poll_schedule_timeout() and pollwake() 2025-06-23 12:36:51 +02:00
seq_file.c
signalfd.c
splice.c netfs: Fix unbuffered write error handling 2025-08-15 15:56:49 +02:00
stack.c docs/vfs: update references to i_mutex to i_rwsem 2025-06-23 12:17:33 +02:00
stat.c constify path argument of vfs_statx_path() 2025-09-15 21:17:07 -04:00
statfs.c
super.c get rid of kill_litter_super() 2025-11-17 23:59:27 -05:00
sync.c
sysctls.c
timerfd.c
userfaultfd.c mm/mremap: use an explicit uffd failure path for mremap 2025-07-24 19:12:29 -07:00
utimes.c
xattr.c vfs-6.17-rc1.misc 2025-07-28 11:22:56 -07:00