summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/viro/bdevLinus Torvalds2008-10-2316-94/+93
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/viro/bdev: (66 commits) [PATCH] kill the rest of struct file propagation in block ioctls [PATCH] get rid of struct file use in blkdev_ioctl() BLKBSZSET [PATCH] get rid of blkdev_locked_ioctl() [PATCH] get rid of blkdev_driver_ioctl() [PATCH] sanitize blkdev_get() and friends [PATCH] remember mode of reiserfs journal [PATCH] propagate mode through swsusp_close() [PATCH] propagate mode through open_bdev_excl/close_bdev_excl [PATCH] pass fmode_t to blkdev_put() [PATCH] kill the unused bsize on the send side of /dev/loop [PATCH] trim file propagation in block/compat_ioctl.c [PATCH] end of methods switch: remove the old ones [PATCH] switch sr [PATCH] switch sd [PATCH] switch ide-scsi [PATCH] switch tape_block [PATCH] switch dcssblk [PATCH] switch dasd [PATCH] switch mtd_blkdevs [PATCH] switch mmc ...
| * [PATCH] kill the rest of struct file propagation in block ioctlsAl Viro2008-10-211-2/+6
| | | | | | | | | | | | Now we can switch blkdev_ioctl() block_device/mode Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * [PATCH] sanitize blkdev_get() and friendsAl Viro2008-10-213-45/+24
| | | | | | | | | | | | | | | | * get rid of fake struct file/struct dentry in __blkdev_get() * merge __blkdev_get() and do_open() * get rid of flags argument of blkdev_get() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * [PATCH] remember mode of reiserfs journalAl Viro2008-10-211-2/+4
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * [PATCH] propagate mode through open_bdev_excl/close_bdev_exclAl Viro2008-10-214-20/+25
| | | | | | | | | | | | | | replace open_bdev_excl/close_bdev_excl with variants taking fmode_t. superblock gets the value used to mount it stored in sb->s_mode Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * [PATCH] pass fmode_t to blkdev_put()Al Viro2008-10-217-22/+22
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * [PATCH] end of methods switch: remove the old onesAl Viro2008-10-211-13/+0
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * [PATCH] beginning of methods conversionAl Viro2008-10-211-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To keep the size of changesets sane we split the switch by drivers; to keep the damn thing bisectable we do the following: 1) rename the affected methods, add ones with correct prototypes, make (few) callers handle both. That's this changeset. 2) for each driver convert to new methods. *ALL* drivers are converted in this series. 3) kill the old (renamed) methods. Note that it _is_ a flagday; all in-tree drivers are converted and by the end of this series no trace of old methods remain. The only reason why we do that this way is to keep the damn thing bisectable and allow per-driver debugging if anything goes wrong. New methods: open(bdev, mode) release(disk, mode) ioctl(bdev, mode, cmd, arg) /* Called without BKL */ compat_ioctl(bdev, mode, cmd, arg) locked_ioctl(bdev, mode, cmd, arg) /* Called with BKL, legacy */ Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * [PATCH] move block_device_operations to blkdev.hAl Viro2008-10-211-0/+1
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * [PATCH] eliminate use of ->f_flags in block methodsAl Viro2008-10-211-0/+7
| | | | | | | | | | | | store needed information in f_mode Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * [PATCH] introduce fmode_t, do annotationsAl Viro2008-10-218-17/+19
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | Merge branch 'for-linus' of ↵Linus Torvalds2008-10-2366-1070/+823
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (46 commits) [PATCH] fs: add a sanity check in d_free [PATCH] i_version: remount support [patch] vfs: make security_inode_setattr() calling consistent [patch 1/3] FS_MBCACHE: don't needlessly make it built-in [PATCH] move executable checking into ->permission() [PATCH] fs/dcache.c: update comment of d_validate() [RFC PATCH] touch_mnt_namespace when the mount flags change [PATCH] reiserfs: add missing llseek method [PATCH] fix ->llseek for more directories [PATCH vfs-2.6 6/6] vfs: add LOOKUP_RENAME_TARGET intent [PATCH vfs-2.6 5/6] vfs: remove LOOKUP_PARENT from non LOOKUP_PARENT lookup [PATCH vfs-2.6 4/6] vfs: remove unnecessary fsnotify_d_instantiate() [PATCH vfs-2.6 3/6] vfs: add __d_instantiate() helper [PATCH vfs-2.6 2/6] vfs: add d_ancestor() [PATCH vfs-2.6 1/6] vfs: replace parent == dentry->d_parent by IS_ROOT() [PATCH] get rid of on-stack dentry in udf [PATCH 2/2] anondev: switch to IDA [PATCH 1/2] anondev: init IDR statically [JFFS2] Use d_splice_alias() not d_add() in jffs2_lookup() [PATCH] Optimise NFS readdir hack slightly. ...
| * | [PATCH] fs: add a sanity check in d_freeArjan van de Ven2008-10-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi Al, remember that debug session we did at KS? You suggested this patch back then.... From 7751eaf30474b8cbfaea64795805a17eab05ac53 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven <arjan@linux.intel.com> Date: Tue, 16 Sep 2008 16:51:17 -0700 Subject: [PATCH] fs: add a sanity check in d_free we're seeing some corruption in the dentry->d_alias list that appears like a free of an entry still on the list; this patch adds a WARN_ON() to catch this scenario, as suggested by Al Viro Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
| * | [patch] vfs: make security_inode_setattr() calling consistentMiklos Szeredi2008-10-231-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Call security_inode_setattr() consistetly before inode_change_ok(). It doesn't make sense to try to "optimize" the i_op->setattr == NULL case, as most filesystem do define their own setattr function. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
| * | [patch 1/3] FS_MBCACHE: don't needlessly make it built-inAdrian Bunk2008-10-231-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assume you have: - one or more of ext2/3/4 statically built into your kernel - none of these with extended attributes enabled and - want to add onother one of ext2/3/4 modular and with extended attributes enabled then you currently have to reboot to use it since this results in CONFIG_FS_MBCACHE=y. That's not a common issue, but I just ran into it and since there's no reason to get a built-in mbcache in this case this patch fixes it. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Andreas Gruenbacher <agruen@suse.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
| * | [PATCH] move executable checking into ->permission()Miklos Szeredi2008-10-238-44/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For execute permission on a regular files we need to check if file has any execute bits at all, regardless of capabilites. This check is normally performed by generic_permission() but was also added to the case when the filesystem defines its own ->permission() method. In the latter case the filesystem should be responsible for performing this check. Move the check from inode_permission() inside filesystems which are not calling generic_permission(). Create a helper function execute_ok() that returns true if the inode is a directory or if any execute bits are present in i_mode. Also fix up the following code: - coda control file is never executable - sysctl files are never executable - hfs_permission seems broken on MAY_EXEC, remove - hfsplus_permission is eqivalent to generic_permission(), remove Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
| * | [PATCH] fs/dcache.c: update comment of d_validate()Qinghuang Feng2008-10-231-2/+0
| | | | | | | | | | | | | | | | | | | | | Parameters @hash and @len have been removed since 2.4.3, now just to delete them. Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
| * | [RFC PATCH] touch_mnt_namespace when the mount flags changeDan Williams2008-10-231-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Daemons that need to be launched while the rootfs is read-only can now poll /proc/mounts to be notified when their O_RDWR requests may no longer end in EROFS. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | [PATCH] reiserfs: add missing llseek methodChristoph Hellwig2008-10-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Reiserfs currently doesn't set a llseek method for regular files, which means it will fall back to default_llseek. This means no one can seek beyond 2 Gigabytes on reiserfs, and that there's not protection vs the i_size updates from writers. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | [PATCH] fix ->llseek for more directoriesChristoph Hellwig2008-10-2311-1/+12
| | | | | | | | | | | | | | | | | | | | | With this patch all directory fops instances that have a readdir that doesn't take the BKL are switched to generic_file_llseek. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | [PATCH vfs-2.6 6/6] vfs: add LOOKUP_RENAME_TARGET intentOGAWA Hirofumi2008-10-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds LOOKUP_RENAME_TARGET intent for lookup of rename destination. LOOKUP_RENAME_TARGET is going to be used like LOOKUP_CREATE. But since the destination of rename() can be existing directory entry, so it has a difference. Although that difference doesn't matter in my usage, this tells it to user of this intent. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
| * | [PATCH vfs-2.6 5/6] vfs: remove LOOKUP_PARENT from non LOOKUP_PARENT lookupOGAWA Hirofumi2008-10-231-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lookup_hash() with LOOKUP_PARENT is bogus. And this prepares to add new intent on those path. The user of LOOKUP_PARENT intent is nfs only, and it checks whether nd->flags has LOOKUP_CREATE or LOOKUP_OPEN, so the result is same. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
| * | [PATCH vfs-2.6 4/6] vfs: remove unnecessary fsnotify_d_instantiate()OGAWA Hirofumi2008-10-231-1/+0
| | | | | | | | | | | | | | | | | | | | | This calls d_move(), so fsnotify_d_instantiate() is unnecessary like rename path. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
| * | [PATCH vfs-2.6 3/6] vfs: add __d_instantiate() helperOGAWA Hirofumi2008-10-231-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds __d_instantiate() for users which is already taking dcache_lock, and replace with it. The part of d_add_ci() isn't equivalent. But it should be needed fsnotify_d_instantiate() actually, because the path is to add the inode to negative dentry. fsnotify_d_instantiate() should be called after change from negative to positive. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
| * | [PATCH vfs-2.6 2/6] vfs: add d_ancestor()OGAWA Hirofumi2008-10-232-34/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds d_ancestor() instead of d_isparent(), then use it. If new_dentry == old_dentry, is_subdir() returns 1, looks strange. "new_dentry == old_dentry" is not subdir obviously. But I'm not checking callers for now, so this keeps current behavior. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
| * | [PATCH vfs-2.6 1/6] vfs: replace parent == dentry->d_parent by IS_ROOT()OGAWA Hirofumi2008-10-232-11/+14
| | | | | | | | | | | | Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
| * | [PATCH] get rid of on-stack dentry in udfAl Viro2008-10-231-15/+11
| | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH 2/2] anondev: switch to IDAAlexey Dobriyan2008-10-231-5/+5
| | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | [PATCH 1/2] anondev: init IDR staticallyAlexey Dobriyan2008-10-231-6/+1
| | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | [JFFS2] Use d_splice_alias() not d_add() in jffs2_lookup()David Woodhouse2008-10-231-3/+1
| | | | | | | | | | | | | | | | | | | | | Now that JFFS2 can be exported by NFS, we need to get this right. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] Optimise NFS readdir hack slightly.David Woodhouse2008-10-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid calling the underlying ->readdir() again when we reached the end already; keep going round the loop only if we stopped due to our own buffer being full. [AV: tidy the things up a bit, while we are there] Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] prepare vfs_readdir() callers to returning filldir resultAl Viro2008-10-234-33/+29
| | | | | | | | | | | | | | | | | | | | | It's not the final state, but it allows moving ->readdir() instances to passing filldir return value to caller of vfs_readdir(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] get rid of on-stack dentry in ext2_get_parent()Al Viro2008-10-233-20/+15
| | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] get rid of on-stack fake dentry in ext3_get_parent()Al Viro2008-10-231-37/+33
| | | | | | | | | | | | | | | | | | | | | | | | Better pass parent and qstr to ext3_find_entry() explicitly than use such kludges, especially since the stack footprint is nasty enough and we have every chance to be deep in call chain. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [JFFS2] Reinstate NFS exportabilityDavid Woodhouse2008-10-231-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the readdir/lookup deadlock issues have been dealt with, we can export JFFS2 file systems again. (For now, you have to specify fsid manually; we should add a method to the export_ops to handle that too.) Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] Remove XFS buffered readdir hackDavid Woodhouse2008-10-231-128/+0
| | | | | | | | | | | | | | | | | | | | | | | | Now that we've moved the readdir hack to the nfsd code, we can remove the local version from the XFS code. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] Copy XFS readdir hack into nfsd code.David Woodhouse2008-10-231-15/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some file systems with their own internal locking have problems with the way that nfsd calls the ->lookup() method from within a filldir function called from their ->readdir() method. The recursion back into the file system code can cause deadlock. XFS has a fairly hackish solution to this which involves doing the readdir() into a locally-allocated buffer, then going back through it calling the filldir function afterwards. It's not ideal, but it works. It's particularly suboptimal because XFS does this for local file systems too, where it's completely unnecessary. Copy this hack into the NFS code where it can be used only for NFS export. In response to feedback, use it unconditionally rather than only for the affected file systems. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] Factor out nfsd_do_readdir() into its own functionDavid Woodhouse2008-10-231-16/+24
| | | | | | | | | | | | | | | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] reduce the stack footprint of exportfs_decode_fh()Al Viro2008-10-231-5/+4
| | | | | | | | | | | | | | | | | | no need to have _two_ 256-byte arrays on stack... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] kill d_alloc_anonChristoph Hellwig2008-10-231-71/+37
| | | | | | | | | | | | | | | | | | | | | Remove d_alloc_anon now that no users are left. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] switch all filesystems over to d_obtain_aliasChristoph Hellwig2008-10-2319-305/+78
| | | | | | | | | | | | | | | | | | | | | Switch all users of d_alloc_anon to d_obtain_alias. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] new helper: d_obtain_aliasChristoph Hellwig2008-10-232-24/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The calling conventions of d_alloc_anon are rather unfortunate for all users, and it's name is not very descriptive either. Add d_obtain_alias as a new exported helper that drops the inode reference in the failure case, too and allows to pass-through NULL pointers and inodes to allow for tail-calls in the export operations. Incidentally this helper already existed as a private function in libfs.c as exportfs_d_alloc so kill that one and switch the callers to d_obtain_alias. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] generic_file_llseek tidyupsChristoph Hellwig2008-10-231-18/+40
| | | | | | | | | | | | | | | | | | | | | | | | Add kerneldoc for generic_file_llseek and generic_file_llseek_unlocked, use sane variable names and unclutter the code. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] tidy up chrdev_openChristoph Hellwig2008-10-231-7/+14
| | | | | | | | | | | | | | | | | | | | | Use a single goto label for chrdev_put + return error cases. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] hpfs: cleanup ->setattrChristoph Hellwig2008-10-234-13/+22
| | | | | | | | | | | | | | | | | | | | | | | | Reformat hpfs_notify_change to standard kernel style to make it readable and rename it to hpfs_setattr as that's what the method is called. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] make O_EXCL in nd->intent.flags visible in nd->flagsAl Viro2008-10-233-6/+6
| | | | | | | | | | | | | | | | | | | | | New flag: LOOKUP_EXCL. Set before doing the final step of pathname resolution on the paths that have LOOKUP_CREATE and O_EXCL. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] get rid of path_lookup_create()Al Viro2008-10-231-39/+22
| | | | | | | | | | | | | | | | | | | | | | | | ... and don't pass bogus flags when we are just looking for parent. Fold __path_lookup_intent_open() into path_lookup_open() while we are at it; that's the only remaining caller. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] assorted path_lookup() -> kern_path() conversionsAl Viro2008-10-233-29/+24
| | | | | | | | | | | | | | | | | | more nameidata eviction Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] switch nfsd to kern_path()Al Viro2008-10-234-58/+56
| | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | [PATCH] sanitize svc_export_parse()Al Viro2008-10-231-42/+35
| | | | | | | | | | | | | | | | | | clean up the exit paths, get rid of nameidata Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
OpenPOWER on IntegriCloud