- 23 Oct, 2008 40 commits
-
-
Miklos Szeredi authored
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>
-
Adrian Bunk authored
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>
-
Miklos Szeredi authored
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>
-
Qinghuang Feng authored
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>
-
Dan Williams authored
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>
-
Christoph Hellwig authored
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>
-
Christoph Hellwig authored
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>
-
OGAWA Hirofumi authored
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>
-
OGAWA Hirofumi authored
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>
-
OGAWA Hirofumi authored
This calls d_move(), so fsnotify_d_instantiate() is unnecessary like rename path. Signed-off-by:
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
-
OGAWA Hirofumi authored
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>
-
OGAWA Hirofumi authored
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>
-
OGAWA Hirofumi authored
Signed-off-by:
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Alexey Dobriyan authored
Signed-off-by:
Alexey Dobriyan <adobriyan@gmail.com>
-
Alexey Dobriyan authored
Signed-off-by:
Alexey Dobriyan <adobriyan@gmail.com>
-
David Woodhouse authored
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>
-
David Woodhouse authored
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>
-
Al Viro authored
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>
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
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>
-
David Woodhouse authored
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>
-
David Woodhouse authored
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>
-
David Woodhouse authored
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>
-
David Woodhouse authored
Signed-off-by:
David Woodhouse <David.Woodhouse@intel.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
no need to have _two_ 256-byte arrays on stack... Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Christoph Hellwig authored
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>
-
Christoph Hellwig authored
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>
-
Christoph Hellwig authored
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>
-
Christoph Hellwig authored
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>
-
Christoph Hellwig authored
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>
-
Christoph Hellwig authored
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>
-
Christoph Hellwig authored
Now that lookup_bdev is exported and used by dm just use it directly instead of through a trivial wrapper. Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
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>
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
... 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>
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
more nameidata eviction Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
clean up the exit paths, get rid of nameidata Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-