alistair23-linux/fs
Al Viro 48a066e72d RCU'd vfsmounts
* RCU-delayed freeing of vfsmounts
* vfsmount_lock replaced with a seqlock (mount_lock)
* sequence number from mount_lock is stored in nameidata->m_seq and
used when we exit RCU mode
* new vfsmount flag - MNT_SYNC_UMOUNT.  Set by umount_tree() when its
caller knows that vfsmount will have no surviving references.
* synchronize_rcu() done between unlocking namespace_sem in namespace_unlock()
and doing pending mntput().
* new helper: legitimize_mnt(mnt, seq).  Checks the mount_lock sequence
number against seq, then grabs reference to mnt.  Then it rechecks mount_lock
again to close the race and either returns success or drops the reference it
has acquired.  The subtle point is that in case of MNT_SYNC_UMOUNT we can
simply decrement the refcount and sod off - aforementioned synchronize_rcu()
makes sure that final mntput() won't come until we leave RCU mode.  We need
that, since we don't want to end up with some lazy pathwalk racing with
umount() and stealing the final mntput() from it - caller of umount() may
expect it to return only once the fs is shut down and we don't want to break
that.  In other cases (i.e. with MNT_SYNC_UMOUNT absent) we have to do
full-blown mntput() in case of mount_lock sequence number mismatch happening
just as we'd grabbed the reference, but in those cases we won't be stealing
the final mntput() from anything that would care.
* mntput_no_expire() doesn't lock anything on the fast path now.  Incidentally,
SMP and UP cases are handled the same way - no ifdefs there.
* normal pathname resolution does *not* do any writes to mount_lock.  It does,
of course, bump the refcounts of vfsmount and dentry in the very end, but that's
it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-11-09 00:16:19 -05:00
..
9p 9p: make v9fs_cache_inode_{get,put,set}_cookie empty inlines for !9P_CACHEFS 2013-10-24 23:34:47 -04:00
adfs adfs: delayed freeing of sbi 2013-10-24 23:43:27 -04:00
affs truncate: drop 'oldsize' truncate_pagecache() parameter 2013-09-12 15:38:02 -07:00
afs afs: dget_parent() can't return a negative dentry 2013-09-29 22:02:24 -04:00
autofs4 autofs4: make freeing sbi rcu-delayed 2013-10-24 23:43:27 -04:00
befs befs: split symlink iops in two - for short and long symlinks resp. 2013-10-24 23:34:50 -04:00
bfs truncate: drop 'oldsize' truncate_pagecache() parameter 2013-09-12 15:38:02 -07:00
btrfs btrfs: Fix crash due to not allocating integrity data for a bioset 2013-10-05 10:52:10 -04:00
cachefiles CacheFiles: Don't try to dump the index key if the cookie has been cleared 2013-09-20 15:15:43 -07:00
ceph ceph: use d_invalidate() to invalidate aliases 2013-09-06 12:55:29 -07:00
cifs cifs: rcu-delay unload_nls() and freeing sbi 2013-10-24 23:43:27 -04:00
coda file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
configfs
cramfs
debugfs
devpts
dlm
ecryptfs file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
efivarfs
efs
exofs truncate: drop 'oldsize' truncate_pagecache() parameter 2013-09-12 15:38:02 -07:00
exportfs exportfs: don't assume that ->iterate() won't feed us too long entries 2013-09-07 19:54:55 -04:00
ext2 truncate: drop 'oldsize' truncate_pagecache() parameter 2013-09-12 15:38:02 -07:00
ext3 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs 2013-09-06 09:06:02 -07:00
ext4 Merge branch 'akpm' (patches from Andrew Morton) 2013-09-12 15:44:27 -07:00
f2fs f2fs: optimize gc for better performance 2013-09-05 13:50:32 +09:00
fat fat: rcu-delay unloading nls and freeing sbi 2013-10-24 23:43:28 -04:00
freevxfs
fscache Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2013-09-19 12:50:37 -05:00
fuse fuse: rcu-delay freeing fuse_conn 2013-10-24 23:45:13 -04:00
gfs2 new helper: kfree_put_link() 2013-10-24 23:34:49 -04:00
hfs truncate: drop 'oldsize' truncate_pagecache() parameter 2013-09-12 15:38:02 -07:00
hfsplus truncate: drop 'oldsize' truncate_pagecache() parameter 2013-09-12 15:38:02 -07:00
hostfs um: hostfs: Fix writeback 2013-09-07 10:38:29 +02:00
hpfs hpfs: make freeing sbi and codetables rcu-delayed 2013-10-24 23:43:26 -04:00
hppfs
hugetlbfs
isofs isofs: don't pass dentry to isofs_hash{i,}_common() 2013-10-24 23:34:59 -04:00
jbd
jbd2
jffs2
jfs truncate: drop 'oldsize' truncate_pagecache() parameter 2013-09-12 15:38:02 -07:00
lockd
logfs
minix truncate: drop 'oldsize' truncate_pagecache() parameter 2013-09-12 15:38:02 -07:00
ncpfs ncpfs: rcu-delay unload_nls() and freeing ncp_server 2013-10-24 23:43:28 -04:00
nfs nfs: use %p[dD] instead of open-coded (and often racy) equivalents 2013-10-24 23:34:50 -04:00
nfs_common
nfsd nfsd: switch to %p[dD] 2013-10-24 23:34:51 -04:00
nilfs2 nilfs2: fix issue with race condition of competition between segments for dirty blocks 2013-09-30 14:31:02 -07:00
nls
notify
ntfs truncate: drop 'oldsize' truncate_pagecache() parameter 2013-09-12 15:38:02 -07:00
ocfs2 ocfs2: needs ->d_lock to poke in ->d_parent->d_inode from ->d_revalidate() 2013-09-29 22:02:20 -04:00
omfs truncate: drop 'oldsize' truncate_pagecache() parameter 2013-09-12 15:38:02 -07:00
openpromfs
proc new helper: kfree_put_link() 2013-10-24 23:34:49 -04:00
pstore pstore: Remove the messages related to compression failure 2013-09-16 09:28:29 -07:00
qnx4
qnx6
quota fs: convert fs shrinkers to new scan/count API 2013-09-10 18:56:31 -04:00
ramfs initmpfs: move rootfs code from fs/ramfs/ to init/ 2013-09-11 15:59:37 -07:00
reiserfs reiserfs: fix race with flush_used_journal_lists and flush_journal_list 2013-09-24 11:24:21 +02:00
romfs
squashfs Squashfs: add corruption check for type in squashfs_readdir() 2013-09-06 04:57:54 +01:00
sysfs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-09-07 14:36:57 -07:00
sysv sysv: Add forgotten superblock lock init for v7 fs 2013-09-29 22:02:02 -04:00
ubifs ubifs: switch to %pd 2013-10-24 23:34:51 -04:00
udf udf: Fortify LVID loading 2013-09-24 11:23:33 +02:00
ufs truncate: drop 'oldsize' truncate_pagecache() parameter 2013-09-12 15:38:02 -07:00
xfs xfs: Use kmem_free() instead of free() 2013-10-04 13:56:12 -05:00
aio.c aio: fix use-after-free in aio_migratepage 2013-09-26 20:34:51 -04:00
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
binfmt_elf.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
binfmt_elf_fdpic.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
binfmt_em86.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio-integrity.c Merge branch 'for-3.12/core' of git://git.kernel.dk/linux-block 2013-09-22 15:00:11 -07:00
bio.c block: Fix bio_copy_data() 2013-09-24 14:41:42 -07:00
block_dev.c a trivial writeback fix 2013-09-13 23:06:40 -04:00
buffer.c
char_dev.c consolidate the reassignments of ->f_op in ->open() instances 2013-10-24 23:34:53 -04:00
compat.c
compat_binfmt_elf.c
compat_ioctl.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
coredump.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
coredump.h
dcache.c RCU'd vfsmounts 2013-11-09 00:16:19 -05:00
dcookies.c
direct-io.c direct-io: Use return from cmpxchg to decide of assignment happened 2013-09-09 10:47:42 -07:00
drop_caches.c shrinker: add node awareness 2013-09-10 18:56:31 -04:00
eventfd.c
eventpoll.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
exec.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
fcntl.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
fhandle.c
file.c
file_table.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
filesystems.c
fs-writeback.c new helpers: lock_mount_hash/unlock_mount_hash 2013-10-24 23:34:59 -04:00
fs_struct.c
generic_acl.c
inode.c fs: convert inode and dentry shrinking to be node aware 2013-09-10 18:56:31 -04:00
internal.h new helpers: lock_mount_hash/unlock_mount_hash 2013-10-24 23:34:59 -04:00
ioctl.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
ioprio.c
Kconfig
Kconfig.binfmt
libfs.c new helper: kfree_put_link() 2013-10-24 23:34:49 -04:00
locks.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
Makefile
mbcache.c fs: convert fs shrinkers to new scan/count API 2013-09-10 18:56:31 -04:00
mount.h RCU'd vfsmounts 2013-11-09 00:16:19 -05:00
mpage.c
namei.c RCU'd vfsmounts 2013-11-09 00:16:19 -05:00
namespace.c RCU'd vfsmounts 2013-11-09 00:16:19 -05:00
no-block.c
open.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
pipe.c
pnode.c split __lookup_mnt() in two functions 2013-10-24 23:35:00 -04:00
pnode.h
posix_acl.c
proc_namespace.c don't bother with vfsmount_lock in mounts_poll() 2013-10-24 23:34:59 -04:00
read_write.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
readdir.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
select.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
seq_file.c
signalfd.c
splice.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
stack.c
stat.c
statfs.c
super.c make freeing super_block rcu-delayed 2013-10-24 23:43:26 -04:00
sync.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
timerfd.c
utimes.c
xattr.c
xattr_acl.c