kernel_optimize_test/fs
Miklos Szeredi 848ac114e8 vfs: check submounts and drop atomically
We check submounts before doing d_drop() on a non-empty directory dentry in
NFS (have_submounts()), but we do not exclude a racing mount.

 Process A: have_submounts() -> returns false
 Process B: mount() -> success
 Process A: d_drop()

This patch prepares the ground for the fix by doing the following
operations all under the same rename lock:

  have_submounts()
  shrink_dcache_parent()
  d_drop()

This is actually an optimization since have_submounts() and
shrink_dcache_parent() both traverse the same dentry tree separately.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: David Howells <dhowells@redhat.com>
CC: Steven Whitehouse <swhiteho@redhat.com>
CC: Trond Myklebust <Trond.Myklebust@netapp.com>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-09-05 16:23:41 -04:00
..
9p
adfs
affs
afs
autofs4
befs
bfs bfs: iget_locked() doesn't return an ERR_PTR 2013-08-24 12:10:22 -04:00
btrfs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-09-05 08:50:26 -07:00
cachefiles
ceph
cifs direct-io: Handle O_(D)SYNC AIO 2013-09-04 09:23:46 -04:00
coda
configfs
cramfs
debugfs
devpts
dlm
ecryptfs
efivarfs
efs efs: iget_locked() doesn't return an ERR_PTR() 2013-08-24 12:10:22 -04:00
exofs
exportfs
ext2
ext3 ext4: Fix misspellings using 'codespell' tool 2013-08-28 14:40:12 -04:00
ext4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-09-05 08:50:26 -07:00
f2fs
fat
freevxfs
fscache
fuse
gfs2
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs cope with potentially long ->d_dname() output for shmem/hugetlb 2013-08-24 12:10:17 -04:00
isofs
jbd
jbd2 jbd2: Fix endian mixing problems in the checksumming code 2013-08-28 14:59:58 -04:00
jffs2
jfs
lockd
logfs
minix
ncpfs
nfs
nfs_common
nfsd nfsd: racy access to ->d_name in nsfd4_encode_path() 2013-09-03 22:50:28 -04:00
nilfs2 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-09-05 08:50:26 -07:00
nls
notify
ntfs
ocfs2 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-09-05 08:50:26 -07:00
omfs
openpromfs
proc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-08-25 12:25:38 -07:00
pstore pstore/ram: (really) fix undefined usage of rounddown_pow_of_two 2013-08-30 15:57:01 -07:00
qnx4
qnx6
quota
ramfs
reiserfs
romfs
squashfs
sysfs sysfs: group.c: fix up kerneldoc 2013-08-22 09:23:28 -07:00
sysv
ubifs
udf
ufs
xfs direct-io: Implement generic deferred AIO completions 2013-09-04 09:23:46 -04:00
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf_fdpic.c
binfmt_elf.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio-integrity.c
bio.c Merge branch 'for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup 2013-09-03 18:25:03 -07:00
block_dev.c direct-io: Handle O_(D)SYNC AIO 2013-09-04 09:23:46 -04:00
buffer.c
char_dev.c
compat_binfmt_elf.c
compat_ioctl.c
compat.c
coredump.c
coredump.h
dcache.c vfs: check submounts and drop atomically 2013-09-05 16:23:41 -04:00
dcookies.c
direct-io.c direct-io: Handle O_(D)SYNC AIO 2013-09-04 09:23:46 -04:00
drop_caches.c
eventfd.c
eventpoll.c switch epoll_ctl() to fdget 2013-09-03 23:04:44 -04:00
exec.c
fcntl.c
fhandle.c
file_table.c only regular files with FMODE_WRITE need to be on s_files 2013-09-03 22:50:28 -04:00
file.c
filesystems.c
fs_struct.c
fs-writeback.c
generic_acl.c
inode.c constify touch_atime() 2013-09-03 22:52:45 -04:00
internal.h
ioctl.c
ioprio.c
Kconfig
Kconfig.binfmt
libfs.c
locks.c
Makefile
mbcache.c
mount.h
mpage.c
namei.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-09-05 08:50:26 -07:00
namespace.c vfs: allow umount to handle mountpoints without revalidating them 2013-09-03 22:50:29 -04:00
no-block.c
open.c switch fchmod() to fdget 2013-09-03 23:04:45 -04:00
pipe.c
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
readdir.c
select.c
seq_file.c
signalfd.c
splice.c
stack.c
stat.c
statfs.c
super.c direct-io: Implement generic deferred AIO completions 2013-09-04 09:23:46 -04:00
sync.c
timerfd.c
utimes.c
xattr_acl.c
xattr.c