summaryrefslogtreecommitdiffstats
path: root/fs
AgeCommit message (Collapse)AuthorFilesLines
2013-11-09convert the rest of binfmt_elf_fdpic to dump_emit()Al Viro1-79/+31
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-11-09binfmt_elf: convert writing actual dump pages to dump_emit()Al Viro1-11/+3
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-11-09switch elf_core_write_extra_data() to dump_emit()Al Viro2-2/+6
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-11-09switch elf_core_write_extra_phdrs() to dump_emit()Al Viro2-3/+5
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-11-09new helper: dump_emit()Al Viro2-37/+37
dump_write() analog, takes core_dump_params instead of file, keeps track of the amount written in cprm->written and checks for cprm->limit. Start using it in binfmt_elf.c... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-11-09coda_revalidate_inode(): switch to passing inode...Al Viro3-4/+3
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-11-09fold __d_shrink() into its only remaining callerAl Viro1-22/+10
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-11-09get rid of s_files and files_lockAl Viro4-143/+2
The only thing we need it for is alt-sysrq-r (emergency remount r/o) and these days we can do just as well without going through the list of files. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-11-09get rid of {lock,unlock}_rcu_walk()Al Viro1-24/+14
those have become aliases for rcu_read_{lock,unlock}() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-11-09RCU'd vfsmountsAl Viro4-82/+133
* 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-09switch shrink_dcache_for_umount() to use of d_walk()Al Viro1-110/+85
we have too many iterators in fs/dcache.c... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24fuse: rcu-delay freeing fuse_connAl Viro3-2/+4
makes ->permission() and ->d_revalidate() safety in RCU mode independent from vfsmount_lock. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24ncpfs: rcu-delay unload_nls() and freeing ncp_serverAl Viro2-8/+13
makes ->d_hash() and ->d_compare() safety in RCU mode independent from vfsmount_lock. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24fat: rcu-delay unloading nls and freeing sbiAl Viro2-8/+12
makes ->d_hash() and ->d_compare() safety in RCU mode independent from vfsmount_lock. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24cifs: rcu-delay unload_nls() and freeing sbiAl Viro2-2/+9
makes ->d_hash(), ->d_compare() and ->permission() safety in RCU mode independent from vfsmount_lock. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24autofs4: make freeing sbi rcu-delayedAl Viro2-9/+5
makes ->d_managed() safety in RCU mode independent from vfsmount_lock Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24adfs: delayed freeing of sbiAl Viro2-5/+7
makes ->d_hash() and ->d_compare() safety in RCU mode independent from vfsmount_lock. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24hpfs: make freeing sbi and codetables rcu-delayedAl Viro2-14/+15
makes ->d_hash() and ->d_compare() safety in RCU mode independent from vfsmount_lock Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24make freeing super_block rcu-delayedAl Viro1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24vfs: introduce d_instantiate_no_diralias()Miklos Szeredi4-40/+32
...which just returns -EBUSY if a directory alias would be created. This is to be used by fuse mkdir to make sure that a buggy or malicious userspace filesystem doesn't do anything nasty. Previously fuse used a private mutex for this purpose, which can now go away. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
2013-10-24move taking vfsmount_lock down into prepend_path()Al Viro1-9/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24split __lookup_mnt() in two functionsAl Viro4-25/+30
Instead of passing the direction as argument (and checking it on every step through the hash chain), just have separate __lookup_mnt() and __lookup_mnt_last(). And use the standard iterators... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24uninline destroy_super(), consolidate alloc_super()Al Viro1-120/+86
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24isofs: don't pass dentry to isofs_hash{i,}_common()Al Viro1-6/+6
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24new helpers: lock_mount_hash/unlock_mount_hashAl Viro5-54/+64
aka br_write_{lock,unlock} of vfsmount_lock. Inlines in fs/mount.h, vfsmount_lock extern moved over there as well. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24don't bother with vfsmount_lock in mounts_poll()Al Viro1-4/+4
wake_up_interruptible/poll_wait provide sufficient barriers; just use ACCESS_ONCE() to fetch ns->event and that's it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24namespace.c: get rid of mnt_ghostsAl Viro3-18/+9
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24fold dup_mnt_ns() into its only surviving callerAl Viro1-30/+18
should've been done 6 years ago... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24mnt_set_expiry() doesn't need vfsmount_lockAl Viro1-2/+0
->mnt_expire is protected by namespace_sem Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24finish_automount() doesn't need vfsmount_lock for removal from expiry listAl Viro1-2/+0
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24fs/namespace.c: bury long-dead defineAl Viro1-2/+0
MNT_WRITER_UNDERFLOW_LIMIT has been missed 4 years ago when it became unused. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24fold mntfree() into mntput_no_expire()Al Viro1-23/+16
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24do_remount(): pull touch_mnt_namespace() upAl Viro1-5/+1
... and don't bother with dropping and regaining vfsmount_lock Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24dup_mnt_ns(): get rid of pointless grabbing of vfsmount_lockAl Viro1-2/+0
mnt_list is protected by namespace_sem, not vfsmount_lock Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24fs_is_visible only needs namespace_sem held sharedAl Viro1-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24initialize namespace_sem staticallyAl Viro1-3/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24file->f_op is never NULL...Al Viro23-87/+67
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24consolidate the reassignments of ->f_op in ->open() instancesAl Viro1-2/+4
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24put_mnt_ns(): use drop_collected_mounts()Al Viro1-5/+1
... rather than open-coding it Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24ncpfs: switch to %p[dD]Al Viro2-43/+24
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24ubifs: switch to %pdAl Viro3-34/+29
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24nfsd: switch to %p[dD]Al Viro5-37/+31
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24nfs: use %p[dD] instead of open-coded (and often racy) equivalentsAl Viro11-186/+119
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24befs: split symlink iops in two - for short and long symlinks resp.Al Viro1-30/+31
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24new helper: kfree_put_link()Al Viro7-38/+14
duplicated to hell and back... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24libfs: get exports to definitions of objects being exported...Al Viro1-35/+34
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24ecryptfs: ->lower_path.dentry is never NULLAl Viro1-2/+1
... on anything found via ->d_fsdata Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24ecryptfs: get rid of ecryptfs_set_dentry_lower{,_mnt}Al Viro3-18/+3
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24ecryptfs: don't leave RCU pathwalk immediatelyAl Viro2-15/+20
If the underlying dentry doesn't have ->d_revalidate(), there's no need to force dropping out of RCU mode. All we need for that is to make freeing ecryptfs_dentry_info RCU-delayed. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-24ecryptfs: check DCACHE_OP_REVALIDATE instead of ->d_opAl Viro1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>