Lines Matching refs:a

57  * As a side effect, dir_namei(), _namei() and follow_link() are now 
58 * replaced with a single function lookup_dentry() that can handle all
62 * long as the refcount of the inode is positive. As a side effect, the
69 * There is still a significant amount of tail- and mid- recursion in
78 * and the name already exists in form of a symlink, try to create the new
82 * the name is a symlink pointing to a non-existent name.
88 * Note that "ln old new" where "new" is a symlink pointing to a non-existing
158 * Uh-oh. We have a name that's approaching PATH_MAX. Allocate a
285 * retrieve POSIX acls it needs to know whether it is called from a blocking or
330 * function may retrieve POSIX acls it needs to know whether it is called from a
379 * generic_permission - check for access rights on a Posix-like filesystem
385 * Used to check for read/write/execute permissions on a file.
453 * even looking at the inode->i_op values. So we keep a cache
485 /* Nobody gets write access to a read-only fs. */
493 * inode_permission - Check for access rights to a given inode
542 * path_get - get a reference to a path
545 * Given a path increment the reference count to the dentry and the vfsmount.
555 * path_put - put a reference to a path
558 * Given a path decrement the reference count to the dentry and the vfsmount.
646 * path_connected - Verify that a dentry is below mnt.mnt_root
650 * Rename can sometimes move a file or directory outside of a bind
759 * (eg. a seqcount has changed), then failure is returned and it's up to caller
899 * be guaranteed by the rest of namei, we want to avoid a namei
900 * BUG resulting in userspace being given a path that was not
903 * So, do a final sanity-check to make sure that in the
904 * worst-case scenario (a complete bypass of LOOKUP_IS_SCOPED)
909 * check, but as discussed elsewhere this is not a concern (the
937 * Jumping to the real root in a scoped-lookup is a BUG in namei, but we
938 * still have to ensure it doesn't happen because it will cause a breakout
992 * Helper to directly jump to a known parsed path from ->get_link,
993 * caller must have taken a reference to path beforehand.
1093 * in a sticky world-writable directory. This is to protect privileged
1096 * It will permit symlinks to be followed only when outside a sticky
1138 * - inode is not a regular file
1170 * may_linkat - Check permissions for creating a hardlink
1178 * - not CAP_FOWNER in a namespace with the inode owner uid mapped
1201 * otherwise, it must be a safe source.
1212 * may_create_in_sticky - Check whether an O_CREAT open in a sticky directory
1219 * Block an O_CREAT open of a FIFO (or a regular file) when:
1222 * - we are in a sticky directory
1267 * Given a path, find the mountpoint of its source file system.
1271 * Return 1 if we went up a level and 0 if we were already at the
1351 /* We don't want to mount if someone's just doing a stat -
1352 * unless they're stat'ing a directory and appended a '/' to
1356 * create a file of any type under the mountpoint, wants to
1376 * positive right under us. Use of smp_load_acquire() provides a barrier
1482 * we meet a managed dentry that would need blocking.
1497 * Don't forget we might have a non-mountpoint managed dentry
1601 /* Don't create child dentry for a dead directory. */
1625 * of a false negative due to a concurrent rename, the caller is
1830 * so we keep a cache of "no, this doesn't need follow_link"
1848 /* not a symlink or should not follow */
1970 * If there was a racing rename or mount along our
2013 * operations one word at a time, but we are limited to:
2016 * do a "get_unaligned()" if this helps and is sufficiently
2020 * do not trap on the (extremely unlikely) case of a page
2025 * the final mask". Again, that could be replaced with a
2030 #include <asm/word-at-a-time.h>
2040 * one temporary. Instead, use a function designed for two state values
2043 * This function cannot create a collision in only two iterations, so
2050 * probability of that delta causing a change to each of the 128 output
2051 * bits, using a sample of random initial states.
2054 * to produce a score. Ideally, any input change has a 50% chance of
2066 #define HASH_MIX(x, y, a) \
2067 ( x ^= (a), \
2074 * latency isn't quite as critical, as there is a fair bit of additional
2096 #define HASH_MIX(x, y, a) \
2097 ( x ^= (a), \
2111 * Return the hash of a string of known length. This is carfully
2113 * In particular, we must end by hashing a final word containing 0..7
2119 unsigned long a, x = 0, y = (unsigned long)salt;
2124 a = load_unaligned_zeropad(name);
2127 HASH_MIX(x, y, a);
2131 x ^= a & bytemask_from_count(len);
2137 /* Return the "hash_len" (hash and length) of a null-terminated string */
2140 unsigned long a = 0, x = 0, y = (unsigned long)salt;
2148 HASH_MIX(x, y, a);
2151 a = load_unaligned_zeropad(name+len);
2152 } while (!has_zero(a, &adata, &constants));
2154 adata = prep_zero_mask(a, adata, &constants);
2156 x ^= a & zero_bytemask(mask);
2168 unsigned long a = 0, b, x = 0, y = (unsigned long)salt;
2176 HASH_MIX(x, y, a);
2179 a = load_unaligned_zeropad(name+len);
2180 b = a ^ REPEAT_BYTE('/');
2181 } while (!(has_zero(a, &adata, &constants) | has_zero(b, &bdata, &constants)));
2183 adata = prep_zero_mask(a, adata, &constants);
2186 x ^= a & zero_bytemask(mask);
2191 #else /* !CONFIG_DCACHE_WORD_ACCESS: Slow, byte-at-a-time version */
2193 /* Return the hash of a string of known length */
2203 /* Return the "hash_len" (hash and length) of a null-terminated string */
2220 * We know there's a real path component here of at least
2241 * This is the basic name resolution function, turning a pathname into
2242 * the final dentry. We expect 'base' to be positive and a directory.
2263 /* At this point we know we have a real path component. */
2334 /* a symlink to follow */
2619 * vfs_path_parent_lookup - lookup a parent path relative to a dentry-vfsmount pair
2637 * vfs_path_lookup - lookup a file path relative to a dentry-vfsmount pair
2697 * Look up a dentry by name in the dcache, returning NULL if it does not
2698 * currently exist. The function does not try to create a dentry.
2700 * Note that this routine is purely a helper for filesystem usage and should
2726 * Note that this routine is purely a helper for filesystem usage and should
2755 * Note that this routine is purely a helper for filesystem usage and should
2785 * Note that this routine is purely a helper for filesystem usage and should
2825 * Note that this routine is purely a helper for filesystem usage and should
2850 * Note that this routine is purely a helper for filesystem usage and should
2930 * Check whether we can remove a link victim from directory dir, check
2937 * a. be owner of dir, or
2943 * 8. If we were asked to remove a directory and victim isn't one - ENOTDIR.
2944 * 9. If we were asked to remove a non-directory and victim isn't one - EISDIR.
2945 * 10. We can't remove a root or mountpoint.
3119 * vfs_prepare_mode - prepare the mode to be used for a new inode
3126 * This helper consolidates and enforces vfs restrictions on the @mode of a new
3134 * Note that it's currently valid for @type to be 0 if a directory is created.
3136 * filesystem can deal with receiving S_IFDIR from the vfs before we enforce a
3166 * Create a new file.
3326 * Attempt to atomically look up, create and open a file from a negative
3548 * a different error; let lookup_open() decide; we'll be
3653 * Create a temporary file.
3702 * kernel_tmpfile_open - open a tmpfile for kernel internal use
3709 * Create and open a temporary file. The file is not accounted in nr_files,
3877 * Do the final lookup. Suppress 'create' if there is a trailing
3878 * '/', and a directory wasn't requested.
3894 * From the vfs_mknod() POV we just have a negative dentry -
3958 * Create a device node or file.
4084 * Create a directory.
4165 * Remove a directory.
4278 * vfs_unlink - unlink a filesystem object
4286 * If vfs_unlink discovers a delegation, it will return -EWOULDBLOCK and
4287 * return a reference to the inode in delegated_inode. The caller
4289 * breaking a delegation may take a long time, the caller should drop
4292 * Alternatively, a caller may pass NULL for delegated_inode. This may
4349 * directory's i_mutex. Truncate can take a long time if there is a lot of
4449 * Create a symlink.
4524 * vfs_link - create a new link
4529 * @delegated_inode: returns inode needing a delegation break
4533 * If vfs_link discovers a delegation on the to-be-linked file in need
4534 * of breaking, it will return -EWOULDBLOCK and return a reference to the
4536 * and retry. Because breaking a delegation may take a long time, the
4539 * Alternatively, a caller may pass NULL for delegated_inode. This may
4706 * vfs_rename - rename a filesystem object
4711 * If vfs_rename discovers a delegation in need of breaking at either
4712 * the source or destination, it will return -EWOULDBLOCK and return a
4714 * break the delegation and retry. Because breaking a delegation may
4715 * take a long time, the caller should drop all locks before doing
4718 * Alternatively, a caller may pass NULL for delegated_inode. This may
4723 * doesn't even start to describe it. Somebody in UCB had a heck of a trip...
4726 * a) we can get into loop creation.
4727 * b) race potential - two innocent renames can create a loop together.
4732 * and source (if it's a non-directory or a subdirectory that moves to
4824 * a victim.
4994 /* unless the source is a directory trailing slashes give -ENOTDIR */