/fs/nilfs2/ |
D | btree.c | 25 struct nilfs_btree_path *path; in nilfs_btree_alloc_path() local 28 path = kmem_cache_alloc(nilfs_btree_path_cache, GFP_NOFS); in nilfs_btree_alloc_path() 29 if (path == NULL) in nilfs_btree_alloc_path() 33 path[level].bp_bh = NULL; in nilfs_btree_alloc_path() 34 path[level].bp_sib_bh = NULL; in nilfs_btree_alloc_path() 35 path[level].bp_index = 0; in nilfs_btree_alloc_path() 36 path[level].bp_oldreq.bpr_ptr = NILFS_BMAP_INVALID_PTR; in nilfs_btree_alloc_path() 37 path[level].bp_newreq.bpr_ptr = NILFS_BMAP_INVALID_PTR; in nilfs_btree_alloc_path() 38 path[level].bp_op = NULL; in nilfs_btree_alloc_path() 42 return path; in nilfs_btree_alloc_path() [all …]
|
/fs/btrfs/ |
D | inode-item.c | 76 struct btrfs_path *path, in btrfs_lookup_inode_extref() argument 88 ret = btrfs_search_slot(trans, root, &key, path, ins_len, cow); in btrfs_lookup_inode_extref() 93 return btrfs_find_name_in_ext_backref(path->nodes[0], path->slots[0], in btrfs_lookup_inode_extref() 104 struct btrfs_path *path; in btrfs_del_inode_extref() local 118 path = btrfs_alloc_path(); in btrfs_del_inode_extref() 119 if (!path) in btrfs_del_inode_extref() 122 path->leave_spinning = 1; in btrfs_del_inode_extref() 124 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in btrfs_del_inode_extref() 135 extref = btrfs_find_name_in_ext_backref(path->nodes[0], path->slots[0], in btrfs_del_inode_extref() 143 leaf = path->nodes[0]; in btrfs_del_inode_extref() [all …]
|
D | free-space-tree.c | 17 struct btrfs_path *path); 49 struct btrfs_path *path) in add_new_free_space_info() argument 61 ret = btrfs_insert_empty_item(trans, root, path, &key, sizeof(*info)); in add_new_free_space_info() 65 leaf = path->nodes[0]; in add_new_free_space_info() 66 info = btrfs_item_ptr(leaf, path->slots[0], in add_new_free_space_info() 74 btrfs_release_path(path); in add_new_free_space_info() 82 struct btrfs_path *path, int cow) in search_free_space_info() argument 93 ret = btrfs_search_slot(trans, root, &key, path, 0, cow); in search_free_space_info() 103 return btrfs_item_ptr(path->nodes[0], path->slots[0], in search_free_space_info() 184 struct btrfs_path *path) in convert_free_space_to_bitmaps() argument [all …]
|
D | file-item.c | 44 struct btrfs_path *path; in btrfs_insert_file_extent() local 47 path = btrfs_alloc_path(); in btrfs_insert_file_extent() 48 if (!path) in btrfs_insert_file_extent() 54 path->leave_spinning = 1; in btrfs_insert_file_extent() 55 ret = btrfs_insert_empty_item(trans, root, path, &file_key, in btrfs_insert_file_extent() 60 leaf = path->nodes[0]; in btrfs_insert_file_extent() 61 item = btrfs_item_ptr(leaf, path->slots[0], in btrfs_insert_file_extent() 76 btrfs_free_path(path); in btrfs_insert_file_extent() 83 struct btrfs_path *path, in btrfs_lookup_csum() argument 99 ret = btrfs_search_slot(trans, root, &file_key, path, 0, cow); in btrfs_lookup_csum() [all …]
|
D | tree-log.c | 102 struct btrfs_path *path, u64 objectid); 106 struct btrfs_path *path, 344 struct btrfs_path *path, in overwrite_item() argument 364 ret = btrfs_search_slot(NULL, root, key, path, 0, 0); in overwrite_item() 371 u32 dst_size = btrfs_item_size_nr(path->nodes[0], in overwrite_item() 372 path->slots[0]); in overwrite_item() 377 btrfs_release_path(path); in overwrite_item() 383 btrfs_release_path(path); in overwrite_item() 391 dst_ptr = btrfs_item_ptr_offset(path->nodes[0], path->slots[0]); in overwrite_item() 392 read_extent_buffer(path->nodes[0], dst_copy, dst_ptr, in overwrite_item() [all …]
|
D | dir-item.c | 21 struct btrfs_path *path, in insert_with_overflow() argument 33 ret = btrfs_insert_empty_item(trans, root, path, cpu_key, data_size); in insert_with_overflow() 36 di = btrfs_match_dir_item_name(fs_info, path, name, name_len); in insert_with_overflow() 39 btrfs_extend_item(path, data_size); in insert_with_overflow() 43 leaf = path->nodes[0]; in insert_with_overflow() 44 item = btrfs_item_nr(path->slots[0]); in insert_with_overflow() 45 ptr = btrfs_item_ptr(leaf, path->slots[0], char); in insert_with_overflow() 57 struct btrfs_path *path, u64 objectid, in btrfs_insert_xattr_item() argument 77 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_xattr_item() 83 leaf = path->nodes[0]; in btrfs_insert_xattr_item() [all …]
|
D | root-tree.c | 67 struct btrfs_path *path, struct btrfs_root_item *root_item, in btrfs_find_root() argument 75 ret = btrfs_search_slot(NULL, root, search_key, path, 0, 0); in btrfs_find_root() 84 if (path->slots[0] == 0) in btrfs_find_root() 86 path->slots[0]--; in btrfs_find_root() 90 l = path->nodes[0]; in btrfs_find_root() 91 slot = path->slots[0]; in btrfs_find_root() 105 btrfs_release_path(path); in btrfs_find_root() 125 struct btrfs_path *path; in btrfs_update_root() local 132 path = btrfs_alloc_path(); in btrfs_update_root() 133 if (!path) in btrfs_update_root() [all …]
|
D | ctree.c | 19 *root, struct btrfs_path *path, int level); 21 const struct btrfs_key *ins_key, struct btrfs_path *path, 29 static void del_ptr(struct btrfs_root *root, struct btrfs_path *path, 1302 tree_mod_log_rewind(struct btrfs_fs_info *fs_info, struct btrfs_path *path, in tree_mod_log_rewind() argument 1318 btrfs_set_path_blocking(path); in tree_mod_log_rewind() 1848 struct btrfs_path *path, int level) in balance_level() argument 1858 int orig_slot = path->slots[level]; in balance_level() 1863 mid = path->nodes[level]; in balance_level() 1865 WARN_ON(path->locks[level] != BTRFS_WRITE_LOCK && in balance_level() 1866 path->locks[level] != BTRFS_WRITE_LOCK_BLOCKING); in balance_level() [all …]
|
D | uuid-tree.c | 26 struct btrfs_path *path = NULL; in btrfs_uuid_tree_lookup() local 38 path = btrfs_alloc_path(); in btrfs_uuid_tree_lookup() 39 if (!path) { in btrfs_uuid_tree_lookup() 45 ret = btrfs_search_slot(NULL, uuid_root, &key, path, 0, 0); in btrfs_uuid_tree_lookup() 53 eb = path->nodes[0]; in btrfs_uuid_tree_lookup() 54 slot = path->slots[0]; in btrfs_uuid_tree_lookup() 78 btrfs_free_path(path); in btrfs_uuid_tree_lookup() 88 struct btrfs_path *path = NULL; in btrfs_uuid_tree_add() local 106 path = btrfs_alloc_path(); in btrfs_uuid_tree_add() 107 if (!path) { in btrfs_uuid_tree_add() [all …]
|
D | extent-tree.c | 54 static int find_next_key(struct btrfs_path *path, int level, 127 struct btrfs_path *path; in btrfs_lookup_data_extent() local 129 path = btrfs_alloc_path(); in btrfs_lookup_data_extent() 130 if (!path) in btrfs_lookup_data_extent() 136 ret = btrfs_search_slot(NULL, fs_info->extent_root, &key, path, 0, 0); in btrfs_lookup_data_extent() 137 btrfs_free_path(path); in btrfs_lookup_data_extent() 156 struct btrfs_path *path; in btrfs_lookup_extent_info() local 174 path = btrfs_alloc_path(); in btrfs_lookup_extent_info() 175 if (!path) in btrfs_lookup_extent_info() 179 path->skip_locking = 1; in btrfs_lookup_extent_info() [all …]
|
D | xattr.c | 28 struct btrfs_path *path; in btrfs_getxattr() local 33 path = btrfs_alloc_path(); in btrfs_getxattr() 34 if (!path) in btrfs_getxattr() 38 di = btrfs_lookup_xattr(NULL, root, path, btrfs_ino(BTRFS_I(inode)), in btrfs_getxattr() 48 leaf = path->nodes[0]; in btrfs_getxattr() 75 btrfs_free_path(path); in btrfs_getxattr() 85 struct btrfs_path *path; in btrfs_setxattr() local 94 path = btrfs_alloc_path(); in btrfs_setxattr() 95 if (!path) in btrfs_setxattr() 97 path->skip_release_on_error = 1; in btrfs_setxattr() [all …]
|
D | tree-defrag.c | 22 struct btrfs_path *path = NULL; in btrfs_defrag_leaves() local 41 path = btrfs_alloc_path(); in btrfs_defrag_leaves() 42 if (!path) in btrfs_defrag_leaves() 68 path->keep_locks = 1; in btrfs_defrag_leaves() 70 ret = btrfs_search_forward(root, &key, path, BTRFS_OLDEST_GENERATION); in btrfs_defrag_leaves() 77 btrfs_release_path(path); in btrfs_defrag_leaves() 83 path->lowest_level = 1; in btrfs_defrag_leaves() 84 wret = btrfs_search_slot(trans, root, &key, path, 0, 1); in btrfs_defrag_leaves() 90 if (!path->nodes[1]) { in btrfs_defrag_leaves() 99 BUG_ON(path->locks[1] == 0); in btrfs_defrag_leaves() [all …]
|
D | relocation.c | 94 struct backref_node *path[BTRFS_MAX_LEVEL]; member 1615 struct btrfs_path *path; in get_new_location() local 1620 path = btrfs_alloc_path(); in get_new_location() 1621 if (!path) in get_new_location() 1625 ret = btrfs_lookup_file_extent(NULL, root, path, in get_new_location() 1634 leaf = path->nodes[0]; in get_new_location() 1635 fi = btrfs_item_ptr(leaf, path->slots[0], in get_new_location() 1651 btrfs_free_path(path); in get_new_location() 1784 struct btrfs_path *path, int level) in memcmp_node_keys() argument 1789 btrfs_node_key(path->nodes[level], &key2, path->slots[level]); in memcmp_node_keys() [all …]
|
D | backref.c | 412 static int add_all_parents(struct btrfs_root *root, struct btrfs_path *path, in add_all_parents() argument 429 eb = path->nodes[level]; in add_all_parents() 441 if (path->slots[0] >= btrfs_header_nritems(path->nodes[0])) { in add_all_parents() 443 ret = btrfs_next_leaf(root, path); in add_all_parents() 445 ret = btrfs_next_old_leaf(root, path, time_seq); in add_all_parents() 449 eb = path->nodes[0]; in add_all_parents() 450 slot = path->slots[0]; in add_all_parents() 487 ret = btrfs_next_item(root, path); in add_all_parents() 489 ret = btrfs_next_old_item(root, path, time_seq); in add_all_parents() 504 struct btrfs_path *path, u64 time_seq, in resolve_indirect_ref() argument [all …]
|
/fs/ |
D | namei.c | 480 void path_get(const struct path *path) in path_get() argument 482 mntget(path->mnt); in path_get() 483 dget(path->dentry); in path_get() 493 void path_put(const struct path *path) in path_put() argument 495 dput(path->dentry); in path_put() 496 mntput(path->mnt); in path_put() 502 struct path path; member 504 struct path root; 512 struct path link; 573 static bool path_connected(const struct path *path) in path_connected() argument [all …]
|
D | fhandle.c | 17 static long do_sys_name_to_handle(struct path *path, in do_sys_name_to_handle() argument 30 if (!path->dentry->d_sb->s_export_op || in do_sys_name_to_handle() 31 !path->dentry->d_sb->s_export_op->fh_to_dentry) in do_sys_name_to_handle() 49 retval = exportfs_encode_fh(path->dentry, in do_sys_name_to_handle() 72 if (put_user(real_mount(path->mnt)->mnt_id, mnt_id) || in do_sys_name_to_handle() 97 struct path path; in SYSCALL_DEFINE5() local 107 err = user_path_at(dfd, name, lookup_flags, &path); in SYSCALL_DEFINE5() 109 err = do_sys_name_to_handle(&path, handle, mnt_id); in SYSCALL_DEFINE5() 110 path_put(&path); in SYSCALL_DEFINE5() 140 struct path *path) in do_handle_to_path() argument [all …]
|
D | d_path.c | 75 static int prepend_path(const struct path *path, in prepend_path() argument 76 const struct path *root, in prepend_path() 96 dentry = path->dentry; in prepend_path() 97 vfsmnt = path->mnt; in prepend_path() 176 char *__d_path(const struct path *path, in __d_path() argument 177 const struct path *root, in __d_path() 184 error = prepend_path(path, root, &res, &buflen); in __d_path() 193 char *d_absolute_path(const struct path *path, in d_absolute_path() argument 196 struct path root = {}; in d_absolute_path() 201 error = prepend_path(path, &root, &res, &buflen); in d_absolute_path() [all …]
|
D | open.c | 74 long vfs_truncate(const struct path *path, loff_t length) in vfs_truncate() argument 80 inode = path->dentry->d_inode; in vfs_truncate() 81 mnt = path->mnt; in vfs_truncate() 89 error = mnt_want_write(path->mnt); in vfs_truncate() 115 error = security_path_truncate(path); in vfs_truncate() 117 error = do_truncate2(mnt, path->dentry, length, 0, NULL); in vfs_truncate() 122 mnt_drop_write(path->mnt); in vfs_truncate() 131 struct path path; in do_sys_truncate() local 138 error = user_path_at(AT_FDCWD, pathname, lookup_flags, &path); in do_sys_truncate() 140 error = vfs_truncate(&path, length); in do_sys_truncate() [all …]
|
D | dcookies.c | 37 struct path path; member 56 return (unsigned long)dcs->path.dentry; in dcookie_value() 94 static struct dcookie_struct *alloc_dcookie(const struct path *path) in alloc_dcookie() argument 102 d = path->dentry; in alloc_dcookie() 107 dcs->path = *path; in alloc_dcookie() 108 path_get(path); in alloc_dcookie() 117 int get_dcookie(const struct path *path, unsigned long *cookie) in get_dcookie() argument 129 if (path->dentry->d_flags & DCACHE_COOKIE) { in get_dcookie() 130 dcs = find_dcookie((unsigned long)path->dentry); in get_dcookie() 132 dcs = alloc_dcookie(path); in get_dcookie() [all …]
|
/fs/ext4/ |
D | extents.c | 134 struct ext4_ext_path *path) in ext4_ext_get_access() argument 136 if (path->p_bh) { in ext4_ext_get_access() 138 BUFFER_TRACE(path->p_bh, "get_write_access"); in ext4_ext_get_access() 139 return ext4_journal_get_write_access(handle, path->p_bh); in ext4_ext_get_access() 153 struct inode *inode, struct ext4_ext_path *path) in __ext4_ext_dirty() argument 158 if (path->p_bh) { in __ext4_ext_dirty() 159 ext4_extent_block_csum_set(inode, ext_block_hdr(path->p_bh)); in __ext4_ext_dirty() 162 inode, path->p_bh); in __ext4_ext_dirty() 171 struct ext4_ext_path *path, in ext4_ext_find_goal() argument 174 if (path) { in ext4_ext_find_goal() [all …]
|
/fs/btrfs/tests/ |
D | free-space-tree-tests.c | 22 struct btrfs_path *path, in __check_free_space_extents() argument 34 info = search_free_space_info(trans, cache, path, 0); in __check_free_space_extents() 40 flags = btrfs_free_space_flags(path->nodes[0], info); in __check_free_space_extents() 41 extent_count = btrfs_free_space_extent_count(path->nodes[0], info); in __check_free_space_extents() 49 if (path->slots[0] != 0) in __check_free_space_extents() 53 while (++path->slots[0] < btrfs_header_nritems(path->nodes[0])) { in __check_free_space_extents() 54 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]); in __check_free_space_extents() 59 bit = free_space_test_bit(cache, path, offset); in __check_free_space_extents() 85 if (btrfs_header_nritems(path->nodes[0]) != num_extents + 1 || in __check_free_space_extents() 86 path->slots[0] != 0) in __check_free_space_extents() [all …]
|
D | qgroup-tests.c | 21 struct btrfs_path *path; in insert_normal_tree_ref() local 33 path = btrfs_alloc_path(); in insert_normal_tree_ref() 34 if (!path) { in insert_normal_tree_ref() 39 path->leave_spinning = 1; in insert_normal_tree_ref() 40 ret = btrfs_insert_empty_item(&trans, root, path, &ins, size); in insert_normal_tree_ref() 43 btrfs_free_path(path); in insert_normal_tree_ref() 47 leaf = path->nodes[0]; in insert_normal_tree_ref() 48 item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); in insert_normal_tree_ref() 63 btrfs_free_path(path); in insert_normal_tree_ref() 72 struct btrfs_path *path; in add_tree_ref() local [all …]
|
/fs/autofs/ |
D | dev-ioctl.c | 121 err = invalid_str(param->path, param->size - AUTOFS_DEV_IOCTL_SIZE); in validate_dev_ioctl() 129 err = check_name(param->path); in validate_dev_ioctl() 182 struct path *res, in find_autofs_mount() 183 int test(const struct path *path, void *data), in find_autofs_mount() argument 186 struct path path; in find_autofs_mount() local 189 err = kern_path_mountpoint(AT_FDCWD, pathname, &path, 0); in find_autofs_mount() 193 while (path.dentry == path.mnt->mnt_root) { in find_autofs_mount() 194 if (path.dentry->d_sb->s_magic == AUTOFS_SUPER_MAGIC) { in find_autofs_mount() 195 if (test(&path, data)) { in find_autofs_mount() 196 path_get(&path); in find_autofs_mount() [all …]
|
/fs/cifs/ |
D | dfs_cache.c | 79 static inline bool is_path_valid(const char *path) in is_path_valid() argument 81 return path && (strchr(path + 1, '\\') || strchr(path + 1, '/')); in is_path_valid() 84 static inline int get_normalized_path(const char *path, char **npath) in get_normalized_path() argument 86 if (*path == '\\') { in get_normalized_path() 87 *npath = (char *)path; in get_normalized_path() 89 *npath = kstrndup(path, strlen(path), GFP_KERNEL); in get_normalized_path() 97 static inline void free_normalized_path(const char *path, char *npath) in free_normalized_path() argument 99 if (path != npath) in free_normalized_path() 317 static inline bool is_sysvol_or_netlogon(const char *path) in is_sysvol_or_netlogon() argument 320 char sep = path[0]; in is_sysvol_or_netlogon() [all …]
|
/fs/reiserfs/ |
D | tail_conversion.c | 26 struct treepath *path, struct buffer_head *unbh, in direct2indirect() argument 31 struct item_head *p_le_ih = tp_item_head(path); in direct2indirect() 66 if (search_for_position_by_key(sb, &end_key, path) == POSITION_FOUND) { in direct2indirect() 70 pathrelse(path); in direct2indirect() 74 p_le_ih = tp_item_head(path); in direct2indirect() 82 PATH_LAST_POSITION(path)++; in direct2indirect() 84 reiserfs_insert_item(th, path, &end_key, &ind_ih, inode, in direct2indirect() 88 retval = reiserfs_paste_into_item(th, path, &end_key, inode, in direct2indirect() 115 if (search_for_position_by_key(sb, &end_key, path) == in direct2indirect() 119 p_le_ih = tp_item_head(path); in direct2indirect() [all …]
|