/fs/btrfs/ |
D | root-tree.c | 33 struct btrfs_path *path; in btrfs_search_root() local 42 path = btrfs_alloc_path(); in btrfs_search_root() 43 BUG_ON(!path); in btrfs_search_root() 45 ret = btrfs_search_slot(NULL, root, &search_key, path, 0, 0); in btrfs_search_root() 52 if (path->slots[0] >= btrfs_header_nritems(path->nodes[0])) { in btrfs_search_root() 53 ret = btrfs_next_leaf(root, path); in btrfs_search_root() 57 btrfs_item_key_to_cpu(path->nodes[0], &search_key, path->slots[0]); in btrfs_search_root() 60 btrfs_release_path(root, path); in btrfs_search_root() 67 btrfs_free_path(path); in btrfs_search_root() 79 struct btrfs_path *path; in btrfs_find_last_root() local [all …]
|
D | inode-item.c | 23 static int find_name_in_backref(struct btrfs_path *path, const char *name, in find_name_in_backref() argument 34 leaf = path->nodes[0]; in find_name_in_backref() 35 item_size = btrfs_item_size_nr(leaf, path->slots[0]); in find_name_in_backref() 36 ptr = btrfs_item_ptr_offset(leaf, path->slots[0]); in find_name_in_backref() 57 struct btrfs_path *path; in btrfs_del_inode_ref() local 72 path = btrfs_alloc_path(); in btrfs_del_inode_ref() 73 if (!path) in btrfs_del_inode_ref() 76 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in btrfs_del_inode_ref() 83 if (!find_name_in_backref(path, name, name_len, &ref)) { in btrfs_del_inode_ref() 87 leaf = path->nodes[0]; in btrfs_del_inode_ref() [all …]
|
D | tree-log.c | 55 struct btrfs_path *path, u64 objectid); 234 struct btrfs_path *path, in overwrite_item() argument 253 ret = btrfs_search_slot(NULL, root, key, path, 0, 0); in overwrite_item() 257 u32 dst_size = btrfs_item_size_nr(path->nodes[0], in overwrite_item() 258 path->slots[0]); in overwrite_item() 263 btrfs_release_path(root, path); in overwrite_item() 271 dst_ptr = btrfs_item_ptr_offset(path->nodes[0], path->slots[0]); in overwrite_item() 272 read_extent_buffer(path->nodes[0], dst_copy, dst_ptr, in overwrite_item() 285 btrfs_release_path(root, path); in overwrite_item() 291 btrfs_release_path(root, path); in overwrite_item() [all …]
|
D | file-item.c | 46 struct btrfs_path *path; in btrfs_insert_file_extent() local 49 path = btrfs_alloc_path(); in btrfs_insert_file_extent() 50 BUG_ON(!path); 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() 82 struct btrfs_path *path, in btrfs_lookup_csum() argument 98 ret = btrfs_search_slot(trans, root, &file_key, path, 0, cow); in btrfs_lookup_csum() 101 leaf = path->nodes[0]; in btrfs_lookup_csum() [all …]
|
D | dir-item.c | 35 struct btrfs_path *path, in insert_with_overflow() argument 46 ret = btrfs_insert_empty_item(trans, root, path, cpu_key, data_size); in insert_with_overflow() 49 di = btrfs_match_dir_item_name(root, path, name, name_len); in insert_with_overflow() 52 ret = btrfs_extend_item(trans, root, path, data_size); in insert_with_overflow() 58 leaf = path->nodes[0]; in insert_with_overflow() 59 item = btrfs_item_nr(leaf, path->slots[0]); in insert_with_overflow() 60 ptr = btrfs_item_ptr(leaf, path->slots[0], char); in insert_with_overflow() 76 struct btrfs_path *path; in btrfs_insert_xattr_item() local 87 path = btrfs_alloc_path(); in btrfs_insert_xattr_item() 88 if (!path) in btrfs_insert_xattr_item() [all …]
|
D | ctree.c | 27 *root, struct btrfs_path *path, int level); 30 struct btrfs_path *path, int data_size, int extend); 39 struct btrfs_path *path, int level, int slot); 43 struct btrfs_path *path; in btrfs_alloc_path() local 44 path = kmem_cache_zalloc(btrfs_path_cachep, GFP_NOFS); in btrfs_alloc_path() 45 if (path) in btrfs_alloc_path() 46 path->reada = 1; in btrfs_alloc_path() 47 return path; in btrfs_alloc_path() 658 static int check_node(struct btrfs_root *root, struct btrfs_path *path, in check_node() argument 662 struct extent_buffer *node = path->nodes[level]; in check_node() [all …]
|
D | inode-map.c | 25 struct btrfs_path *path; in btrfs_find_highest_inode() local 32 path = btrfs_alloc_path(); in btrfs_find_highest_inode() 33 BUG_ON(!path); in btrfs_find_highest_inode() 38 ret = btrfs_search_slot(NULL, root, &search_key, path, 0, 0); in btrfs_find_highest_inode() 42 if (path->slots[0] > 0) { in btrfs_find_highest_inode() 43 slot = path->slots[0] - 1; in btrfs_find_highest_inode() 44 l = path->nodes[0]; in btrfs_find_highest_inode() 52 btrfs_free_path(path); in btrfs_find_highest_inode() 63 struct btrfs_path *path; in btrfs_find_free_objectid() local 80 path = btrfs_alloc_path(); in btrfs_find_free_objectid() [all …]
|
D | xattr.c | 37 struct btrfs_path *path; in __btrfs_getxattr() local 42 path = btrfs_alloc_path(); in __btrfs_getxattr() 43 if (!path) in __btrfs_getxattr() 47 di = btrfs_lookup_xattr(NULL, root, path, inode->i_ino, name, in __btrfs_getxattr() 57 leaf = path->nodes[0]; in __btrfs_getxattr() 84 btrfs_free_path(path); in __btrfs_getxattr() 94 struct btrfs_path *path; in __btrfs_setxattr() local 97 path = btrfs_alloc_path(); in __btrfs_setxattr() 98 if (!path) in __btrfs_setxattr() 105 di = btrfs_lookup_xattr(trans, root, path, inode->i_ino, name, in __btrfs_setxattr() [all …]
|
D | extent-tree.c | 220 struct btrfs_path *path; in cache_block_group() local 235 path = btrfs_alloc_path(); in cache_block_group() 236 if (!path) in cache_block_group() 239 path->reada = 2; in cache_block_group() 245 path->skip_locking = 1; in cache_block_group() 250 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); in cache_block_group() 255 leaf = path->nodes[0]; in cache_block_group() 256 slot = path->slots[0]; in cache_block_group() 258 ret = btrfs_next_leaf(root, path); in cache_block_group() 281 path->slots[0]++; in cache_block_group() [all …]
|
D | tree-defrag.c | 34 struct btrfs_path *path = NULL; in btrfs_defrag_leaves() local 62 path = btrfs_alloc_path(); in btrfs_defrag_leaves() 63 if (!path) in btrfs_defrag_leaves() 90 path->keep_locks = 1; in btrfs_defrag_leaves() 94 ret = btrfs_search_forward(root, &key, NULL, path, in btrfs_defrag_leaves() 102 btrfs_release_path(root, path); in btrfs_defrag_leaves() 103 wret = btrfs_search_slot(trans, root, &key, path, 0, 1); in btrfs_defrag_leaves() 109 if (!path->nodes[1]) { in btrfs_defrag_leaves() 113 path->slots[1] = btrfs_header_nritems(path->nodes[1]); in btrfs_defrag_leaves() 114 next_key_ret = btrfs_find_next_key(root, path, &key, 1, cache_only, in btrfs_defrag_leaves() [all …]
|
D | orphan.c | 25 struct btrfs_path *path; in btrfs_insert_orphan_item() local 33 path = btrfs_alloc_path(); in btrfs_insert_orphan_item() 34 if (!path) in btrfs_insert_orphan_item() 37 ret = btrfs_insert_empty_item(trans, root, path, &key, 0); in btrfs_insert_orphan_item() 39 btrfs_free_path(path); in btrfs_insert_orphan_item() 46 struct btrfs_path *path; in btrfs_del_orphan_item() local 54 path = btrfs_alloc_path(); in btrfs_del_orphan_item() 55 if (!path) in btrfs_del_orphan_item() 58 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in btrfs_del_orphan_item() 62 ret = btrfs_del_item(trans, root, path); in btrfs_del_orphan_item() [all …]
|
D | file.c | 279 struct btrfs_path *path; in btrfs_check_file() 291 path = btrfs_alloc_path(); in btrfs_check_file() 292 ret = btrfs_lookup_file_extent(NULL, root, path, inode->i_ino, in btrfs_check_file() 295 nritems = btrfs_header_nritems(path->nodes[0]); in btrfs_check_file() 296 if (path->slots[0] >= nritems) { in btrfs_check_file() 297 ret = btrfs_next_leaf(root, path); in btrfs_check_file() 300 nritems = btrfs_header_nritems(path->nodes[0]); in btrfs_check_file() 302 slot = path->slots[0]; in btrfs_check_file() 303 leaf = path->nodes[0]; in btrfs_check_file() 335 path->slots[0]++; in btrfs_check_file() [all …]
|
D | volumes.c | 246 static noinline int device_list_add(const char *path, in device_list_add() argument 285 device->name = kstrdup(path, GFP_NOFS); in device_list_add() 538 int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder, in btrfs_scan_one_device() argument 550 bdev = open_bdev_exclusive(path, flags, holder); in btrfs_scan_one_device() 577 (unsigned long long)devid, (unsigned long long)transid, path); in btrfs_scan_one_device() 578 ret = device_list_add(path, disk_super, devid, fs_devices_ret); in btrfs_scan_one_device() 600 struct btrfs_path *path; in find_free_dev_extent() local 610 path = btrfs_alloc_path(); in find_free_dev_extent() 611 if (!path) in find_free_dev_extent() 613 path->reada = 2; in find_free_dev_extent() [all …]
|
D | inode.c | 115 struct btrfs_path *path; in insert_inline_extent() local 133 path = btrfs_alloc_path(); in insert_inline_extent() 134 if (!path) in insert_inline_extent() 145 ret = btrfs_insert_empty_item(trans, root, path, &key, in insert_inline_extent() 152 leaf = path->nodes[0]; in insert_inline_extent() 153 ei = btrfs_item_ptr(leaf, path->slots[0], in insert_inline_extent() 191 btrfs_free_path(path); in insert_inline_extent() 197 btrfs_free_path(path); in insert_inline_extent() 945 struct btrfs_path *path; in run_delalloc_nocow() local 959 path = btrfs_alloc_path(); in run_delalloc_nocow() [all …]
|
/fs/ext4/ |
D | extents.c | 116 struct ext4_ext_path *path) in ext4_ext_get_access() argument 118 if (path->p_bh) { in ext4_ext_get_access() 120 return ext4_journal_get_write_access(handle, path->p_bh); in ext4_ext_get_access() 134 struct ext4_ext_path *path) in ext4_ext_dirty() argument 137 if (path->p_bh) { in ext4_ext_dirty() 139 err = ext4_handle_dirty_metadata(handle, inode, path->p_bh); in ext4_ext_dirty() 148 struct ext4_ext_path *path, in ext4_ext_find_goal() argument 157 if (path) { in ext4_ext_find_goal() 159 depth = path->p_depth; in ext4_ext_find_goal() 162 ex = path[depth].p_ext; in ext4_ext_find_goal() [all …]
|
/fs/ |
D | namei.c | 345 void path_get(struct path *path) in path_get() argument 347 mntget(path->mnt); in path_get() 348 dget(path->dentry); in path_get() 358 void path_put(struct path *path) in path_put() argument 360 dput(path->dentry); in path_put() 361 mntput(path->mnt); in path_put() 533 struct path save = nd->path; in link_path_walk() 542 nd->path = save; in link_path_walk() 543 path_get(&nd->path); in link_path_walk() 563 path_put(&nd->path); in __vfs_follow_link() [all …]
|
D | open.c | 127 struct path path; in SYSCALL_DEFINE2() local 130 error = user_path(pathname, &path); in SYSCALL_DEFINE2() 133 error = vfs_statfs_native(path.dentry, &tmp); in SYSCALL_DEFINE2() 136 path_put(&path); in SYSCALL_DEFINE2() 143 struct path path; in SYSCALL_DEFINE3() local 148 error = user_path(pathname, &path); in SYSCALL_DEFINE3() 151 error = vfs_statfs64(path.dentry, &tmp); in SYSCALL_DEFINE3() 154 path_put(&path); in SYSCALL_DEFINE3() 226 struct path path; in do_sys_truncate() local 234 error = user_path(pathname, &path); in do_sys_truncate() [all …]
|
D | xattr.c | 258 struct path path; in SYSCALL_DEFINE5() local 261 error = user_path(pathname, &path); in SYSCALL_DEFINE5() 264 error = mnt_want_write(path.mnt); in SYSCALL_DEFINE5() 266 error = setxattr(path.dentry, name, value, size, flags); in SYSCALL_DEFINE5() 267 mnt_drop_write(path.mnt); in SYSCALL_DEFINE5() 269 path_put(&path); in SYSCALL_DEFINE5() 277 struct path path; in SYSCALL_DEFINE5() local 280 error = user_lpath(pathname, &path); in SYSCALL_DEFINE5() 283 error = mnt_want_write(path.mnt); in SYSCALL_DEFINE5() 285 error = setxattr(path.dentry, name, value, size, flags); in SYSCALL_DEFINE5() [all …]
|
D | dcookies.c | 35 struct path path; member 54 return (unsigned long)dcs->path.dentry; in dcookie_value() 92 static struct dcookie_struct *alloc_dcookie(struct path *path) in alloc_dcookie() argument 100 d = path->dentry; in alloc_dcookie() 105 dcs->path = *path; in alloc_dcookie() 106 path_get(path); in alloc_dcookie() 115 int get_dcookie(struct path *path, unsigned long *cookie) in get_dcookie() argument 127 if (path->dentry->d_flags & DCACHE_COOKIE) { in get_dcookie() 128 dcs = find_dcookie((unsigned long)path->dentry); in get_dcookie() 130 dcs = alloc_dcookie(path); in get_dcookie() [all …]
|
D | namespace.c | 476 static void detach_mnt(struct vfsmount *mnt, struct path *old_path) in detach_mnt() 495 static void attach_mnt(struct vfsmount *mnt, struct path *path) in attach_mnt() argument 497 mnt_set_mountpoint(path->mnt, path->dentry, mnt); in attach_mnt() 499 hash(path->mnt, path->dentry)); in attach_mnt() 500 list_add_tail(&mnt->mnt_child, &path->mnt->mnt_mounts); in attach_mnt() 806 struct path mnt_path = { .dentry = mnt->mnt_root, .mnt = mnt }; in show_vfsmnt() 837 struct path mnt_path = { .dentry = mnt->mnt_root, .mnt = mnt }; in show_mountinfo() 838 struct path root = p->root; in show_mountinfo() 896 struct path mnt_path = { .dentry = mnt->mnt_root, .mnt = mnt }; in show_vfsstat() 1135 struct path path; in SYSCALL_DEFINE2() local [all …]
|
/fs/nfs/ |
D | getroot.c | 135 const char *path) in nfs4_path_walk() argument 143 dprintk("--> nfs4_path_walk(,,%s)\n", path); in nfs4_path_walk() 149 while (*path == '/') in nfs4_path_walk() 150 path++; in nfs4_path_walk() 173 dprintk("Next: %s\n", path); in nfs4_path_walk() 176 if (!*path) in nfs4_path_walk() 179 name.name = path; in nfs4_path_walk() 180 while (*path && *path != '/') in nfs4_path_walk() 181 path++; in nfs4_path_walk() 182 name.len = path - (const char *) name.name; in nfs4_path_walk() [all …]
|
D | namespace.c | 113 dput(nd->path.dentry); in nfs_follow_mountpoint() 114 nd->path.dentry = dget(dentry); in nfs_follow_mountpoint() 117 parent = dget_parent(nd->path.dentry); in nfs_follow_mountpoint() 119 &nd->path.dentry->d_name, in nfs_follow_mountpoint() 126 mnt = nfs_do_refmount(nd->path.mnt, nd->path.dentry); in nfs_follow_mountpoint() 128 mnt = nfs_do_submount(nd->path.mnt, nd->path.dentry, &fh, in nfs_follow_mountpoint() 135 err = do_add_mount(mnt, &nd->path, nd->path.mnt->mnt_flags|MNT_SHRINKABLE, in nfs_follow_mountpoint() 143 path_put(&nd->path); in nfs_follow_mountpoint() 144 nd->path.mnt = mnt; in nfs_follow_mountpoint() 145 nd->path.dentry = dget(mnt->mnt_root); in nfs_follow_mountpoint() [all …]
|
/fs/autofs4/ |
D | dev-ioctl.c | 141 err = invalid_str(param->path, in validate_dev_ioctl() 150 err = check_name(param->path); in validate_dev_ioctl() 212 dentry = d_lookup(nd->path.dentry, &nd->last); in autofs_dev_ioctl_find_super() 216 dput(nd->path.dentry); in autofs_dev_ioctl_find_super() 217 nd->path.dentry = dentry; in autofs_dev_ioctl_find_super() 220 while (follow_down(&nd->path.mnt, &nd->path.dentry)) { in autofs_dev_ioctl_find_super() 221 inode = nd->path.dentry->d_inode; in autofs_dev_ioctl_find_super() 251 dentry = d_lookup(nd->path.dentry, &nd->last); in autofs_dev_ioctl_find_sbi_type() 255 dput(nd->path.dentry); in autofs_dev_ioctl_find_sbi_type() 256 nd->path.dentry = dentry; in autofs_dev_ioctl_find_sbi_type() [all …]
|
/fs/coda/ |
D | pioctl.c | 52 struct path path; in coda_pioctl() local 68 error = user_path(data.path, &path); in coda_pioctl() 70 error = user_lpath(data.path, &path); in coda_pioctl() 76 target_inode = path.dentry->d_inode; in coda_pioctl() 81 path_put(&path); in coda_pioctl() 90 path_put(&path); in coda_pioctl()
|
/fs/configfs/ |
D | symlink.c | 111 static int get_target(const char *symname, struct path *path, in get_target() argument 116 ret = kern_path(symname, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, path); in get_target() 118 if (path->dentry->d_sb == configfs_sb) { in get_target() 119 *target = configfs_get_config_item(path->dentry); in get_target() 122 path_put(path); in get_target() 135 struct path path; in configfs_symlink() local 162 ret = get_target(symname, &path, &target_item); in configfs_symlink() 177 path_put(&path); in configfs_symlink() 239 char *path) in configfs_get_target_path() argument 251 for (s = path; depth--; s += 3) in configfs_get_target_path() [all …]
|