summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* constify do_coredump() argumentAl Viro2013-11-094-6/+6
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* constify copy_siginfo_to_user{,32}()Al Viro2013-11-0914-14/+14
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ... and kill anon_inode_getfile_private()Al Viro2013-11-092-69/+0
| | | | | | it's a seriously misguided API, now fortunately without users. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* rework aio migrate pages to use aio fsBenjamin LaHaise2013-11-091-6/+57
| | | | | | | | | | Don't abuse anon_inodes.c to host private files needed by aio; we can bloody well declare a mini-fs of our own instead of patching up what anon_inodes can create for us. Tested-by: Benjamin LaHaise <bcrl@kvack.org> Acked-by: Benjamin LaHaise <bcrl@kvack.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* take anon inode allocation to libfs.cAl Viro2013-11-093-48/+46
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* new helper: dump_align()Al Viro2013-11-095-17/+15
| | | | | | dump_skip to given alignment... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* spufs: get rid of dump_emit() wrappersAl Viro2013-11-091-49/+20
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* dump_skip(): dump_seek() replacement taking coredump_paramsAl Viro2013-11-096-43/+22
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* make dump_emit() use vfs_write() instead of banging at ->f_op->write directlyAl Viro2013-11-091-5/+12
| | | | | | | | ... and deal with short writes properly - the output might be to pipe, after all; as it is, e.g. no-MMU case of elf_fdpic coredump can write a whole lot more than a page worth of data at one call. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* binfmt_elf: count notes towards coredump limitAl Viro2013-11-091-3/+0
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* aout: switch to dump_emitAl Viro2013-11-092-16/+11
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch elf_coredump_extra_notes_write() to dump_emit()Al Viro2013-11-096-38/+30
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* convert the rest of binfmt_elf_fdpic to dump_emit()Al Viro2013-11-091-79/+31
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* binfmt_elf: convert writing actual dump pages to dump_emit()Al Viro2013-11-091-11/+3
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch elf_core_write_extra_data() to dump_emit()Al Viro2013-11-095-13/+11
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch elf_core_write_extra_phdrs() to dump_emit()Al Viro2013-11-096-21/+15
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* new helper: dump_emit()Al Viro2013-11-094-37/+40
| | | | | | | | 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>
* restore 32bit aout coredumpAl Viro2013-11-091-34/+36
| | | | | | just getting rid of bitrot Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* no need to keep brlock macros anymore...Al Viro2013-11-091-10/+0
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* coda_revalidate_inode(): switch to passing inode...Al Viro2013-11-093-4/+3
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* fold __d_shrink() into its only remaining callerAl Viro2013-11-091-22/+10
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* get rid of s_files and files_lockAl Viro2013-11-095-156/+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>
* get rid of {lock,unlock}_rcu_walk()Al Viro2013-11-091-24/+14
| | | | | | those have become aliases for rcu_read_{lock,unlock}() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* RCU'd vfsmountsAl Viro2013-11-096-83/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* switch shrink_dcache_for_umount() to use of d_walk()Al Viro2013-11-091-110/+85
| | | | | | we have too many iterators in fs/dcache.c... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* fuse: rcu-delay freeing fuse_connAl Viro2013-10-243-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>
* pid_namespace: make freeing struct pid_namespace rcu-delayedAl Viro2013-10-242-1/+8
| | | | | | | makes procfs ->premission() instances safety in RCU mode independent from vfsmount_lock. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ncpfs: rcu-delay unload_nls() and freeing ncp_serverAl Viro2013-10-242-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>
* fat: rcu-delay unloading nls and freeing sbiAl Viro2013-10-242-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>
* cifs: rcu-delay unload_nls() and freeing sbiAl Viro2013-10-242-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>
* autofs4: make freeing sbi rcu-delayedAl Viro2013-10-242-9/+5
| | | | | | makes ->d_managed() safety in RCU mode independent from vfsmount_lock Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* adfs: delayed freeing of sbiAl Viro2013-10-242-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>
* hpfs: make freeing sbi and codetables rcu-delayedAl Viro2013-10-242-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>
* make freeing super_block rcu-delayedAl Viro2013-10-242-1/+2
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* vfs: introduce d_instantiate_no_diralias()Miklos Szeredi2013-10-245-40/+33
| | | | | | | | | | ...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>
* move taking vfsmount_lock down into prepend_path()Al Viro2013-10-241-9/+2
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* split __lookup_mnt() in two functionsAl Viro2013-10-244-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>
* uninline destroy_super(), consolidate alloc_super()Al Viro2013-10-241-120/+86
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* isofs: don't pass dentry to isofs_hash{i,}_common()Al Viro2013-10-241-6/+6
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* new helpers: lock_mount_hash/unlock_mount_hashAl Viro2013-10-245-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>
* don't bother with vfsmount_lock in mounts_poll()Al Viro2013-10-241-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>
* namespace.c: get rid of mnt_ghostsAl Viro2013-10-243-18/+9
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* fold dup_mnt_ns() into its only surviving callerAl Viro2013-10-241-30/+18
| | | | | | should've been done 6 years ago... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* mnt_set_expiry() doesn't need vfsmount_lockAl Viro2013-10-241-2/+0
| | | | | | ->mnt_expire is protected by namespace_sem Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* finish_automount() doesn't need vfsmount_lock for removal from expiry listAl Viro2013-10-241-2/+0
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* fs/namespace.c: bury long-dead defineAl Viro2013-10-241-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>
* fold mntfree() into mntput_no_expire()Al Viro2013-10-241-23/+16
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* do_remount(): pull touch_mnt_namespace() upAl Viro2013-10-241-5/+1
| | | | | | ... and don't bother with dropping and regaining vfsmount_lock Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* dup_mnt_ns(): get rid of pointless grabbing of vfsmount_lockAl Viro2013-10-241-2/+0
| | | | | | mnt_list is protected by namespace_sem, not vfsmount_lock Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* fs_is_visible only needs namespace_sem held sharedAl Viro2013-10-241-2/+2
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
OpenPOWER on IntegriCloud