mirror-linux/Documentation/filesystems
Linus Torvalds 292a2bcd17 Fixing livelocks in shrink_dcache_tree()
If shrink_dcache_tree() finds a dentry in the middle of being killed
 by another thread, it has to wait until the victim finishes dying,
 gets detached from the tree and ceases to pin its parent.
 
 The way we used to deal with that amounted to busy-wait; unfortunately,
 it's not just inefficient but can lead to reliably reproducible hard
 livelocks.
 
 Solved by having shrink_dentry_tree() attach a completion to such dentry,
 with dentry_unlist() calling complete() on all objects attached to it.
 With a bit of care it can be done without growing struct dentry or adding
 overhead in normal case.
 
 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQqUNBr3gm4hGXdBJlZ7Krx/gZQ6wUCaec/ugAKCRBZ7Krx/gZQ
 6y77AP9l/IL36Ic45p45FCTirA6LFyIvZ5Gixm3Xk64Pi1Y3nAEAqQ5UOVnJc907
 RyrCpcI6vnO8a67MptchOxK9d1bIxQw=
 =A8JL
 -----END PGP SIGNATURE-----

Merge tag 'pull-dcache-busy-wait' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull dcache busy loop updates from Al Viro:
 "Fix livelocks in shrink_dcache_tree()

  If shrink_dcache_tree() finds a dentry in the middle of being killed
  by another thread, it has to wait until the victim finishes dying,
  gets detached from the tree and ceases to pin its parent.

  The way we used to deal with that amounted to busy-wait;
  unfortunately, it's not just inefficient but can lead to reliably
  reproducible hard livelocks.

  Solved by having shrink_dentry_tree() attach a completion to such
  dentry, with dentry_unlist() calling complete() on all objects
  attached to it. With a bit of care it can be done without growing
  struct dentry or adding overhead in normal case"

* tag 'pull-dcache-busy-wait' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  get rid of busy-waiting in shrink_dcache_tree()
  dcache.c: more idiomatic "positives are not allowed" sanity checks
  struct dentry: make ->d_u anonymous
  for_each_alias(): helper macro for iterating through dentries of given inode
2026-04-21 07:30:44 -07:00
..
caching
ext4 Documentation: ext4: Document casefold and encrypt flags 2025-11-26 17:13:34 -05:00
fuse Documentation: fuse: Consolidate FUSE docs into its own subdirectory 2025-08-27 14:29:43 +02:00
gfs2 Documentation: gfs2: Consolidate GFS2 docs into its own subdirectory 2025-10-31 21:00:43 +00:00
iomap fs, iomap: remove IOCB_DIO_CALLER_COMP 2025-11-25 10:22:18 +01:00
nfs NFSD: Sign filehandles 2026-03-29 21:25:09 -04:00
smb cifs: add documentation for smbdirect setup 2025-06-05 10:20:48 -05:00
spufs docs: spufs: fix ppc64 architecture line break 2026-01-06 15:21:26 -07:00
xfs xfs: new code for v6.19 2025-12-03 20:19:38 -08:00
9p.rst 9p update for 6.15-rc1 2025-04-03 15:35:46 -07:00
adfs.rst
affs.rst
afs.rst
api-summary.rst docs: filesystems: add fs/open.c to api-summary 2026-01-16 11:33:15 -07:00
autofs-mount-control.rst
autofs.rst Documentation: filesystems: update filename extensions 2024-11-22 10:31:04 -07:00
automount-support.rst
befs.rst
bfs.rst
btrfs.rst
buffer.rst
ceph.rst
coda.rst documentation/filesystems: fix spelling mistakes 2025-02-10 10:42:28 -07:00
configfs.rst
cramfs.rst
dax.rst doc: Remove misleading reference to brd in dax.rst 2025-06-25 12:49:29 -06:00
debugfs.rst docs: debugfs: do not recommend debugfs_remove_recursive 2025-04-30 19:11:04 +02:00
devpts.rst
directory-locking.rst
dlmfs.rst Documentation: filesystems: update filename extensions 2024-11-22 10:31:04 -07:00
dnotify.rst
ecryptfs.rst
efivarfs.rst
erofs.rst A slightly calmer cycle for docs this time around, though there is still a 2026-02-09 20:53:18 -08:00
ext2.rst doc : fix a broken link in ext2.rst 2025-12-19 15:01:27 +01:00
ext3.rst
f2fs.rst f2fs: introduce FAULT_SKIP_WRITE 2026-01-27 02:45:58 +00:00
fiemap.rst fiemap: use kernel-doc includes in fiemap docbook 2024-12-22 11:29:50 +01:00
files.rst
fscrypt.rst fscrypt: Drop obsolete recommendation to enable optimized NHPoly1305 2026-01-12 11:07:50 -08:00
fsverity.rst fs: add FS_XFLAG_VERITY for fs-verity files 2026-01-29 16:00:57 +01:00
hfs.rst
hfsplus.rst
hpfs.rst Documentation: Fix filesystems typos 2025-08-18 10:31:19 -06:00
idmappings.rst doc: correcting two prefix errors in idmappings.rst 2025-03-05 11:54:18 +01:00
index.rst Major changes: 2026-04-17 16:35:49 -07:00
inotify.rst
isofs.rst
journalling.rst jbd2: remove unused transaction->t_private_list 2025-02-10 07:48:24 -05:00
locking.rst NFSD: Enforce timeout on layout recall and integrate lease manager fencing 2026-03-29 21:25:09 -04:00
locks.rst
mmap_prepare.rst mm: add mmap_action_map_kernel_pages[_full]() 2026-04-05 13:53:45 -07:00
mount_api.rst fs: remove fsparam_path / fs_param_is_path 2026-02-19 14:34:26 +01:00
multigrain-ts.rst
netfs_library.rst fs/netfs: remove unused flag NETFS_SREQ_SEEK_DATA_READ 2025-05-21 14:34:37 +02:00
nilfs2.rst
ntfs.rst ntfs: repair docum. malformed table 2026-02-26 18:26:07 +09:00
ntfs3.rst
ocfs2-online-filecheck.rst Documentation: ocfs2: Properly reindent filecheck operations list 2025-08-29 15:50:50 -06:00
ocfs2.rst
omfs.rst
orangefs.rst
overlayfs.rst ovl: make fsync after metadata copy-up opt-in mount option 2026-03-27 12:48:10 +01:00
path-lookup.rst docs: path-lookup: fix unrenamed WALK_GET 2026-03-22 14:54:23 -06:00
path-lookup.txt Documentation: filesystems: update filename extensions 2024-11-22 10:31:04 -07:00
porting.rst Fixing livelocks in shrink_dcache_tree() 2026-04-21 07:30:44 -07:00
proc.rst mm.git review status for linus..mm-stable 2026-04-19 08:01:17 -07:00
propagate_umount.txt docs: fix trailing whitespace error and remove repeated words in propagate_umount.txt 2025-08-21 12:49:01 -06:00
qnx6.rst
quota.rst
ramfs-rootfs-initramfs.rst fs: use nullfs unconditionally as the real rootfs 2026-01-14 11:23:39 +01:00
relay.rst docs: fix 're-use' -> 'reuse' in documentation 2026-02-02 09:54:15 -07:00
resctrl.rst fs/resctrl: Add "*" shorthand to set io_alloc CBM for all domains 2026-04-02 00:22:59 +02:00
romfs.rst
seq_file.rst Documentation: seq_file: drop 2.6 reference 2026-04-10 08:39:08 -06:00
sharedsubtree.rst Documentation: sharedsubtree: Convert notes to note directive 2025-08-29 16:40:01 -06:00
splice.rst
squashfs.rst Documentation: update the Squashfs filesystem documentation 2025-01-24 22:47:21 -08:00
sysfs.rst kernel.h: move VERIFY_OCTAL_PERMISSIONS() to sysfs.h 2026-01-31 16:16:05 -08:00
tmpfs.rst
ubifs-authentication.rst Documentation: treewide: Replace remaining spinics links with lore 2025-06-21 14:20:51 -06:00
ubifs.rst
udf.rst
vfat.rst
vfs.rst vfs-7.0-rc1.namespace 2026-02-09 14:43:47 -08:00
virtiofs.rst
zonefs.rst