summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* make d_splice_alias(ERR_PTR(err), dentry) = ERR_PTR(err)Al Viro2011-07-2015-94/+39
| | | | | | ... and simplify the living hell out of callers Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* deuglify squashfs_lookup()Al Viro2011-07-201-4/+1
| | | | | | | | d_splice_alias(NULL, dentry) is equivalent to d_add(dentry, NULL), NULL so no need for that if (inode) ... in there (or ERR_PTR(0), for that matter) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* nfsd4_list_rec_dir(): don't bother with reopening rec_fileAl Viro2011-07-201-31/+21
| | | | | | | just rewind it to the beginning before vfs_readdir() and be done with that... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* kill useless checks for sb->s_op == NULLAl Viro2011-07-203-3/+2
| | | | | | never is... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* btrfs: kill magical embedded struct superblockAl Viro2011-07-205-22/+31
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* get rid of pointless checks for dentry->sb == NULLAl Viro2011-07-202-2/+1
| | | | | | it never is... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* Make ->d_sb assign-once and always non-NULLAl Viro2011-07-203-39/+47
| | | | | | | | | | | | | | New helper (non-exported, fs/internal.h-only): __d_alloc(sb, name). Allocates dentry, sets its ->d_sb to given superblock and sets ->d_op accordingly. Old d_alloc(NULL, name) callers are converted to that (all of them know what superblock they want). d_alloc() itself is left only for parent != NULl case; uses __d_alloc(), inserts result into the list of parent's children. Note that now ->d_sb is assign-once and never NULL *and* ->d_parent is never NULL either. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* unexport kern_path_parent()Al Viro2011-07-201-1/+0
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch vfs_path_lookup() to struct pathAl Viro2011-07-205-28/+26
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* kill lookup_create()Al Viro2011-07-202-37/+18
| | | | | | folded into the only caller (kern_path_create()) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* devtmpfs: get rid of bogus mkdir in create_path()Al Viro2011-07-201-24/+18
| | | | | | | | | We do _NOT_ want to mkdir the path itself - we are preparing to mknod it, after all. Normally it'll fail with -ENOENT and just do nothing, but if somebody has created the parent in the meanwhile, we'll get buggered... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch devtmpfs to kern_path_create()Al Viro2011-07-201-47/+36
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch devtmpfs object creation/removal to separate kernel threadAl Viro2011-07-201-73/+149
| | | | | | | | ... and give it a namespace where devtmpfs would be mounted on root, thus avoiding abuses of vfs_path_lookup() (it was never intended to be used with LOOKUP_PARENT). Games with credentials are also gone. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* make sure that nsproxy_cache is initialized early enoughAl Viro2011-07-203-3/+3
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch do_spufs_create() to user_path_create(), fix double-unlockAl Viro2011-07-203-32/+21
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* new helpers: kern_path_create/user_path_createAl Viro2011-07-204-137/+106
| | | | | | | combination of kern_path_parent() and lookup_create(). Does *not* expose struct nameidata to caller. Syscalls converted to that... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* kill LOOKUP_CONTINUEAl Viro2011-07-202-9/+3
| | | | | | LOOKUP_PARENT is equivalent to it now Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* nfs: LOOKUP_{OPEN,CREATE,EXCL} is set only on the last stepAl Viro2011-07-201-4/+2
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* cifs_lookup(): LOOKUP_OPEN is set only on the last componentAl Viro2011-07-201-1/+1
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ceph: LOOKUP_OPEN is set only when it's the last componentAl Viro2011-07-201-1/+0
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* jfs_ci_revalidate() is safe from RCU modeAl Viro2011-07-201-2/+0
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* LOOKUP_CREATE and LOOKUP_RENAME_TARGET can be set only on the last stepAl Viro2011-07-203-12/+6
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* no need to check for LOOKUP_OPEN in ->create() instancesAl Viro2011-07-205-10/+10
| | | | | | | ... it will be set in nd->flag for all cases with non-NULL nd (i.e. when called from do_last()). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* don't pass nameidata to vfs_create() from ecryptfs_create()Al Viro2011-07-201-28/+5
| | | | | | | | | Instead of playing with removal of LOOKUP_OPEN, mangling (and restoring) nd->path, just pass NULL to vfs_create(). The whole point of what's being done there is to suppress any attempts to open file by underlying fs, which is what nd == NULL indicates. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* don't transliterate lower bits of ->intent.open.flags to FMODE_...Al Viro2011-07-207-31/+24
| | | | | | ->create() instances are much happier that way... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* Don't pass nameidata when calling vfs_create() from mknod()Al Viro2011-07-201-1/+1
| | | | | | | All instances can cope with that now (and ceph one actually starts working properly). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* fix mknod() on nfs4 (hopefully)Al Viro2011-07-201-12/+12
| | | | | | | | | a) check the right flags in ->create() (LOOKUP_OPEN, not LOOKUP_CREATE) b) default (!LOOKUP_OPEN) open_flags is O_CREAT|O_EXCL|FMODE_READ, not 0 c) lookup_instantiate_filp() should be done only with LOOKUP_OPEN; otherwise we need to issue CLOSE, lest we leak stateid on server. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* nameidata_to_nfs_open_context() doesn't need nameidata, actually...Al Viro2011-07-201-6/+7
| | | | | | | just open flags; switched to passing just those and renamed to create_nfs_open_context() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* nfs_open_context doesn't need struct path eitherAl Viro2011-07-208-44/+42
| | | | | | just dentry, please... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* nfs4_opendata doesn't need struct path eitherAl Viro2011-07-201-23/+22
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* nfs4_closedata doesn't need to mess with struct pathAl Viro2011-07-203-22/+21
| | | | | | | instead of path_get()/path_put(), we can just use nfs_sb_{,de}active() to pin the superblock down. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* cifs: fix the type of cifs_demultiplex_thread()Al Viro2011-07-201-2/+3
| | | | | | | | | ... and get rid of a bogus typecast, while we are at it; it's not just that we want a function returning int and not void, but cast to pointer to function taking void * and returning void would be (void (*)(void *)) and not (void *)(void *), TYVM... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ecryptfs_inode_permission() doesn't need to bail out on RCUAl Viro2011-07-201-2/+0
| | | | | | | ... now that inode_permission() can take MAY_NOT_BLOCK and handle it properly. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* kill IPERM_FLAG_RCUAl Viro2011-07-201-2/+0
| | | | | | not used anymore Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ->permission() sanitizing: document API changesAl Viro2011-07-201-3/+7
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* merge do_revalidate() into its only callerAl Viro2011-07-201-24/+18
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* no reason to keep exec_permission() separate nowAl Viro2011-07-201-41/+4
| | | | | | cache footprint alone makes it a bad idea... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* massage generic_permission() to treat directories on a separate pathAl Viro2011-07-201-4/+13
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ->permission() sanitizing: don't pass flags to exec_permission()Al Viro2011-07-203-27/+7
| | | | | | | pass mask instead; kill security_inode_exec_permission() since we can use security_inode_permission() instead. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* selinux: don't transliterate MAY_NOT_BLOCK to IPERM_FLAG_RCUAl Viro2011-07-202-3/+3
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ->permission() sanitizing: don't pass flags to ->inode_permission()Al Viro2011-07-205-8/+13
| | | | | | pass that via mask instead. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ->permission() sanitizing: don't pass flags to ->permission()Al Viro2011-07-2031-55/+55
| | | | | | not used by the instances anymore. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ->permission() sanitizing: don't pass flags to generic_permission()Al Viro2011-07-2016-19/+18
| | | | | | | redundant; all callers get it duplicated in mask & MAY_NOT_BLOCK and none of them removes that bit. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ->permission() sanitizing: don't pass flags to ->check_acl()Al Viro2011-07-2028-32/+32
| | | | | | not used in the instances anymore. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ->permission() sanitizing: pass MAY_NOT_BLOCK to ->check_acl()Al Viro2011-07-2013-15/+14
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ->permission() sanitizing: MAY_NOT_BLOCKAl Viro2011-07-203-3/+7
| | | | | | Duplicate the flags argument into mask bitmap. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* kill check_acl callback of generic_permission()Al Viro2011-07-2020-37/+47
| | | | | | | its value depends only on inode and does not change; we might as well store it in ->i_op->check_acl and be done with that. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* lockless get_write_access/deny_write_accessAl Viro2011-07-203-49/+52
| | | | | | new helpers: atomic_inc_unless_negative()/atomic_dec_unless_positive() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* move exec_permission() up to the rest of permission-related functionsAl Viro2011-07-201-34/+38
| | | | | | ... and convert the comment before it into linuxdoc form. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* kill file_permission() completelyAl Viro2011-07-203-20/+2
| | | | | | convert the last remaining caller to inode_permission() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
OpenPOWER on IntegriCloud