linux/Documentation/filesystems
Al Viro 5467a68cbf dcache: sort the freeing-without-RCU-delay mess for good.
For lockless accesses to dentries we don't have pinned we rely
(among other things) upon having an RCU delay between dropping
the last reference and actually freeing the memory.

On the other hand, for things like pipes and sockets we neither
do that kind of lockless access, nor want to deal with the
overhead of an RCU delay every time a socket gets closed.

So delay was made optional - setting DCACHE_RCUACCESS in ->d_flags
made sure it would happen.  We tried to avoid setting it unless
we knew we need it.  Unfortunately, that had led to recurring
class of bugs, in which we missed the need to set it.

We only really need it for dentries that are created by
d_alloc_pseudo(), so let's not bother with trying to be smart -
just make having an RCU delay the default.  The ones that do
*not* get it set the replacement flag (DCACHE_NORCU) and we'd
better use that sparingly.  d_alloc_pseudo() is the only
such user right now.

FWIW, the race that finally prompted that switch had been
between __lock_parent() of immediate subdirectory of what's
currently the root of a disconnected tree (e.g. from
open-by-handle in progress) racing with d_splice_alias()
elsewhere picking another alias for the same inode, either
on outright corrupted fs image, or (in case of open-by-handle
on NFS) that subdirectory having been just moved on server.
It's not easy to hit, so the sky is not falling, but that's
not the first race on similar missed cases and the logics
for settinf DCACHE_RCUACCESS has gotten ridiculously
convoluted.

Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-04-09 19:18:04 -04:00
..
caching Documentation: Use "while" instead of "whilst" 2018-11-20 09:30:43 -07:00
cifs cifs: minor documentation updates 2019-03-14 19:32:36 -05:00
configfs configfs: fix wrong name of struct in documentation 2018-12-20 08:41:38 -07:00
ext4 docs: promote the ext4 data structures book to top level 2018-10-05 19:20:08 -04:00
nfs Olga added support for the NFSv4.2 asynchronous copy protocol. We 2018-10-30 13:03:29 -07:00
9p.txt
adfs.txt
affs.txt
afs.txt
api-summary.rst docs: Bring some order to filesystem documentation 2019-03-06 09:46:10 -07:00
autofs-mount-control.txt autofs: use autofs instead of autofs4 in documentation 2018-06-07 17:34:39 -07:00
autofs.txt autofs: use autofs instead of autofs4 in documentation 2018-06-07 17:34:39 -07:00
automount-support.txt autofs: use autofs instead of autofs4 in documentation 2018-06-07 17:34:39 -07:00
befs.txt
bfs.txt
binderfs.rst Documentation/filesystems: add binderfs 2019-01-14 17:21:37 -07:00
btrfs.txt
ceph.txt Documentation: modern versions of ceph are not backed by btrfs 2019-03-05 18:55:18 +01:00
coda.txt
conf.py
cramfs.txt
dax.txt doc: filesystems: fix bad references to nonexistent ext4.rst file 2019-01-03 09:28:45 -07:00
debugfs.txt
devpts.txt
directory-locking
dlmfs.txt
dnotify.txt
ecryptfs.txt
efivarfs.txt
ext2.txt doc: filesystems: fix bad references to nonexistent ext4.rst file 2019-01-03 09:28:45 -07:00
ext3.txt
f2fs.txt f2fs: fix to document inline_xattr_size option 2019-03-05 19:58:05 -08:00
fiemap.txt
files.txt
fscrypt.rst fscrypt: return -EXDEV for incompatible rename or link into encrypted dir 2019-01-23 23:56:43 -05:00
fuse-io.txt
fuse.txt
gfs2-glocks.txt
gfs2-uevents.txt
gfs2.txt
hfs.txt
hfsplus.txt
hpfs.txt
index.rst docs: Bring some order to filesystem documentation 2019-03-06 09:46:10 -07:00
inotify.txt
isofs.txt
jfs.txt
journalling.rst docs: Bring some order to filesystem documentation 2019-03-06 09:46:10 -07:00
Locking overlayfs update for 4.19 2018-08-21 18:19:09 -07:00
locks.txt
mandatory-locking.txt
mount_api.txt vfs: Update mount API docs 2019-03-28 08:54:20 -07:00
nilfs2.txt
ntfs.txt
ocfs2-online-filecheck.txt
ocfs2.txt
omfs.txt
orangefs.txt
overlayfs.txt ovl: automatically enable redirect_dir on metacopy=on 2018-11-01 21:31:39 +01:00
path-lookup.rst docs: Bring some order to filesystem documentation 2019-03-06 09:46:10 -07:00
path-lookup.txt
porting dcache: sort the freeing-without-RCU-delay mess for good. 2019-04-09 19:18:04 -04:00
proc.txt A fairly normal cycle for documentation stuff. We have a new 2018-12-29 11:21:49 -08:00
qnx6.txt Documentation: Use "while" instead of "whilst" 2018-11-20 09:30:43 -07:00
quota.txt
ramfs-rootfs-initramfs.txt initramfs: move gen_initramfs_list.sh from scripts/ to usr/ 2018-08-22 23:21:44 +09:00
relay.txt Documentation : Update relay function types 2018-07-10 15:11:00 -06:00
romfs.txt
seq_file.txt fs/seq_file.c: simplify seq_file iteration code and interface 2018-08-17 16:20:28 -07:00
sharedsubtree.txt
splice.rst docs: Bring some order to filesystem documentation 2019-03-06 09:46:10 -07:00
spufs.txt Documentation: fix spelling mistake, EACCESS -> EACCES 2018-11-07 15:28:55 -07:00
squashfs.txt
sysfs-pci.txt
sysfs-tagging.txt
sysfs.txt A fairly routine cycle for docs - lots of typo fixes, some new documents, 2019-03-09 09:56:17 -08:00
sysv-fs.txt
tmpfs.txt
ubifs-authentication.md Documentation: ubifs: Add authentication whitepaper 2018-10-23 13:49:01 +02:00
ubifs.txt ubifs: Enable authentication support 2018-10-23 13:49:01 +02:00
udf.txt
ufs.txt
vfat.txt
vfs.txt fs: add an iopoll method to struct file_operations 2019-02-24 08:20:17 -07:00
xfs-delayed-logging-design.txt
xfs-self-describing-metadata.txt Documentation: Use "while" instead of "whilst" 2018-11-20 09:30:43 -07:00
xfs.txt xfs: Introduce XFS_PTAG_VERIFIER_ERROR panic mask 2019-02-11 16:07:00 -08:00