Home
last modified time | relevance | path

Searched refs:path (Results 1 – 25 of 201) sorted by relevance

123456789

/fs/nilfs2/
Dbtree.c38 struct nilfs_btree_path *path; in nilfs_btree_alloc_path() local
41 path = kmem_cache_alloc(nilfs_btree_path_cache, GFP_NOFS); in nilfs_btree_alloc_path()
42 if (path == NULL) in nilfs_btree_alloc_path()
46 path[level].bp_bh = NULL; in nilfs_btree_alloc_path()
47 path[level].bp_sib_bh = NULL; in nilfs_btree_alloc_path()
48 path[level].bp_index = 0; in nilfs_btree_alloc_path()
49 path[level].bp_oldreq.bpr_ptr = NILFS_BMAP_INVALID_PTR; in nilfs_btree_alloc_path()
50 path[level].bp_newreq.bpr_ptr = NILFS_BMAP_INVALID_PTR; in nilfs_btree_alloc_path()
51 path[level].bp_op = NULL; in nilfs_btree_alloc_path()
55 return path; in nilfs_btree_alloc_path()
[all …]
/fs/btrfs/
Dinode-item.c25 static int find_name_in_backref(struct btrfs_path *path, const char *name, in find_name_in_backref() argument
36 leaf = path->nodes[0]; in find_name_in_backref()
37 item_size = btrfs_item_size_nr(leaf, path->slots[0]); in find_name_in_backref()
38 ptr = btrfs_item_ptr_offset(leaf, path->slots[0]); in find_name_in_backref()
54 int btrfs_find_name_in_ext_backref(struct btrfs_path *path, u64 ref_objectid, in btrfs_find_name_in_ext_backref() argument
66 leaf = path->nodes[0]; in btrfs_find_name_in_ext_backref()
67 item_size = btrfs_item_size_nr(leaf, path->slots[0]); in btrfs_find_name_in_ext_backref()
68 ptr = btrfs_item_ptr_offset(leaf, path->slots[0]); in btrfs_find_name_in_ext_backref()
98 struct btrfs_path *path, in btrfs_lookup_inode_extref() argument
111 ret = btrfs_search_slot(trans, root, &key, path, ins_len, cow); in btrfs_lookup_inode_extref()
[all …]
Droot-tree.c83 struct btrfs_path *path, struct btrfs_root_item *root_item, in btrfs_find_root() argument
91 ret = btrfs_search_slot(NULL, root, search_key, path, 0, 0); in btrfs_find_root()
100 if (path->slots[0] == 0) in btrfs_find_root()
102 path->slots[0]--; in btrfs_find_root()
106 l = path->nodes[0]; in btrfs_find_root()
107 slot = path->slots[0]; in btrfs_find_root()
121 btrfs_release_path(path); in btrfs_find_root()
140 struct btrfs_path *path; in btrfs_update_root() local
147 path = btrfs_alloc_path(); in btrfs_update_root()
148 if (!path) in btrfs_update_root()
[all …]
Dfile-item.c50 struct btrfs_path *path; in btrfs_insert_file_extent() local
53 path = btrfs_alloc_path(); in btrfs_insert_file_extent()
54 if (!path) in btrfs_insert_file_extent()
60 path->leave_spinning = 1; in btrfs_insert_file_extent()
61 ret = btrfs_insert_empty_item(trans, root, path, &file_key, in btrfs_insert_file_extent()
66 leaf = path->nodes[0]; in btrfs_insert_file_extent()
67 item = btrfs_item_ptr(leaf, path->slots[0], in btrfs_insert_file_extent()
82 btrfs_free_path(path); in btrfs_insert_file_extent()
89 struct btrfs_path *path, in btrfs_lookup_csum() argument
104 ret = btrfs_search_slot(trans, root, &file_key, path, 0, cow); in btrfs_lookup_csum()
[all …]
Dtree-log.c105 struct btrfs_path *path, u64 objectid);
109 struct btrfs_path *path,
337 struct btrfs_path *path, in overwrite_item() argument
357 ret = btrfs_search_slot(NULL, root, key, path, 0, 0); in overwrite_item()
364 u32 dst_size = btrfs_item_size_nr(path->nodes[0], in overwrite_item()
365 path->slots[0]); in overwrite_item()
370 btrfs_release_path(path); in overwrite_item()
376 btrfs_release_path(path); in overwrite_item()
384 dst_ptr = btrfs_item_ptr_offset(path->nodes[0], path->slots[0]); in overwrite_item()
385 read_extent_buffer(path->nodes[0], dst_copy, dst_ptr, in overwrite_item()
[all …]
Ddir-item.c35 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 btrfs_extend_item(root, path, data_size); in insert_with_overflow()
56 leaf = path->nodes[0]; in insert_with_overflow()
57 item = btrfs_item_nr(path->slots[0]); in insert_with_overflow()
58 ptr = btrfs_item_ptr(leaf, path->slots[0], char); in insert_with_overflow()
70 struct btrfs_path *path, u64 objectid, in btrfs_insert_xattr_item() argument
89 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_xattr_item()
95 leaf = path->nodes[0]; in btrfs_insert_xattr_item()
[all …]
Dctree.c29 *root, struct btrfs_path *path, int level);
32 struct btrfs_path *path, int data_size, int extend);
40 static void del_ptr(struct btrfs_root *root, struct btrfs_path *path,
47 struct btrfs_path *path; in btrfs_alloc_path() local
48 path = kmem_cache_zalloc(btrfs_path_cachep, GFP_NOFS); in btrfs_alloc_path()
49 return path; in btrfs_alloc_path()
1336 tree_mod_log_rewind(struct btrfs_fs_info *fs_info, struct btrfs_path *path, in tree_mod_log_rewind() argument
1352 btrfs_set_path_blocking(path); in tree_mod_log_rewind()
1377 btrfs_clear_path_blocking(path, NULL, BTRFS_READ_LOCK); in tree_mod_log_rewind()
1863 struct btrfs_path *path, int level) in balance_level() argument
[all …]
Duuid-tree.c38 struct btrfs_path *path = NULL; in btrfs_uuid_tree_lookup() local
50 path = btrfs_alloc_path(); in btrfs_uuid_tree_lookup()
51 if (!path) { in btrfs_uuid_tree_lookup()
57 ret = btrfs_search_slot(NULL, uuid_root, &key, path, 0, 0); in btrfs_uuid_tree_lookup()
65 eb = path->nodes[0]; in btrfs_uuid_tree_lookup()
66 slot = path->slots[0]; in btrfs_uuid_tree_lookup()
89 btrfs_free_path(path); in btrfs_uuid_tree_lookup()
98 struct btrfs_path *path = NULL; in btrfs_uuid_tree_add() local
116 path = btrfs_alloc_path(); in btrfs_uuid_tree_add()
117 if (!path) { in btrfs_uuid_tree_add()
[all …]
Dxattr.c40 struct btrfs_path *path; in __btrfs_getxattr() local
45 path = btrfs_alloc_path(); in __btrfs_getxattr()
46 if (!path) in __btrfs_getxattr()
50 di = btrfs_lookup_xattr(NULL, root, path, btrfs_ino(inode), name, in __btrfs_getxattr()
60 leaf = path->nodes[0]; in __btrfs_getxattr()
87 btrfs_free_path(path); in __btrfs_getxattr()
97 struct btrfs_path *path; in do_setxattr() local
104 path = btrfs_alloc_path(); in do_setxattr()
105 if (!path) in do_setxattr()
107 path->skip_release_on_error = 1; in do_setxattr()
[all …]
Dorphan.c25 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()
66 ret = btrfs_del_item(trans, root, path); in btrfs_del_orphan_item()
[all …]
Drelocation.c103 struct backref_node *path[BTRFS_MAX_LEVEL]; member
1589 struct btrfs_path *path; local
1594 path = btrfs_alloc_path();
1595 if (!path)
1599 ret = btrfs_lookup_file_extent(NULL, root, path, btrfs_ino(reloc_inode),
1608 leaf = path->nodes[0];
1609 fi = btrfs_item_ptr(leaf, path->slots[0],
1625 btrfs_free_path(path);
1750 struct btrfs_path *path, int level) argument
1755 btrfs_node_key(path->nodes[level], &key2, path->slots[level]);
[all …]
Dbackref.c247 static int add_all_parents(struct btrfs_root *root, struct btrfs_path *path, in add_all_parents() argument
264 eb = path->nodes[level]; in add_all_parents()
276 if (path->slots[0] >= btrfs_header_nritems(path->nodes[0])) { in add_all_parents()
278 ret = btrfs_next_leaf(root, path); in add_all_parents()
280 ret = btrfs_next_old_leaf(root, path, time_seq); in add_all_parents()
284 eb = path->nodes[0]; in add_all_parents()
285 slot = path->slots[0]; in add_all_parents()
322 ret = btrfs_next_item(root, path); in add_all_parents()
324 ret = btrfs_next_old_item(root, path, time_seq); in add_all_parents()
339 struct btrfs_path *path, u64 time_seq, in __resolve_indirect_ref() argument
[all …]
Dsend.c500 struct btrfs_path *path; in alloc_path_for_send() local
502 path = btrfs_alloc_path(); in alloc_path_for_send()
503 if (!path) in alloc_path_for_send()
505 path->search_commit_root = 1; in alloc_path_for_send()
506 path->skip_locking = 1; in alloc_path_for_send()
507 path->need_commit_sem = 1; in alloc_path_for_send()
508 return path; in alloc_path_for_send()
720 struct fs_path *path, struct fs_path *lnk) in send_link() argument
724 verbose_printk("btrfs: send_link %s -> %s\n", path->start, lnk->start); in send_link()
730 TLV_PUT_PATH(sctx, BTRFS_SEND_A_PATH, path); in send_link()
[all …]
Dexport.c157 struct btrfs_path *path; in btrfs_get_parent() local
164 path = btrfs_alloc_path(); in btrfs_get_parent()
165 if (!path) in btrfs_get_parent()
179 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); in btrfs_get_parent()
184 if (path->slots[0] == 0) { in btrfs_get_parent()
189 path->slots[0]--; in btrfs_get_parent()
190 leaf = path->nodes[0]; in btrfs_get_parent()
192 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_get_parent()
199 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_get_parent()
205 btrfs_free_path(path); in btrfs_get_parent()
[all …]
Dextent-tree.c102 static int find_next_key(struct btrfs_path *path, int level,
404 struct btrfs_path *path; in caching_thread() local
418 path = btrfs_alloc_path(); in caching_thread()
419 if (!path) in caching_thread()
439 path->skip_locking = 1; in caching_thread()
440 path->search_commit_root = 1; in caching_thread()
441 path->reada = 1; in caching_thread()
452 ret = btrfs_search_slot(NULL, extent_root, &key, path, 0, 0); in caching_thread()
456 leaf = path->nodes[0]; in caching_thread()
465 if (path->slots[0] < nritems) { in caching_thread()
[all …]
Dtree-defrag.c35 struct btrfs_path *path = NULL; in btrfs_defrag_leaves() local
55 path = btrfs_alloc_path(); in btrfs_defrag_leaves()
56 if (!path) in btrfs_defrag_leaves()
82 path->keep_locks = 1; in btrfs_defrag_leaves()
84 ret = btrfs_search_forward(root, &key, path, min_trans); in btrfs_defrag_leaves()
91 btrfs_release_path(path); in btrfs_defrag_leaves()
92 wret = btrfs_search_slot(trans, root, &key, path, 0, 1); in btrfs_defrag_leaves()
98 if (!path->nodes[1]) { in btrfs_defrag_leaves()
102 path->slots[1] = btrfs_header_nritems(path->nodes[1]); in btrfs_defrag_leaves()
103 next_key_ret = btrfs_find_next_key(root, path, &key, 1, in btrfs_defrag_leaves()
[all …]
/fs/
Dnamei.c491 void path_get(const struct path *path) in path_get() argument
493 mntget(path->mnt); in path_get()
494 dget(path->dentry); in path_get()
504 void path_put(const struct path *path) in path_put() argument
506 dput(path->dentry); in path_put()
507 mntput(path->mnt); in path_put()
513 struct path path; member
515 struct path root;
523 struct path link;
586 static bool path_connected(const struct path *path) in path_connected() argument
[all …]
Dfhandle.c15 static long do_sys_name_to_handle(struct path *path, in do_sys_name_to_handle() argument
28 if (!path->dentry->d_sb->s_export_op || in do_sys_name_to_handle()
29 !path->dentry->d_sb->s_export_op->fh_to_dentry) in do_sys_name_to_handle()
47 retval = exportfs_encode_fh(path->dentry, in do_sys_name_to_handle()
70 if (copy_to_user(mnt_id, &real_mount(path->mnt)->mnt_id, in do_sys_name_to_handle()
96 struct path path; in SYSCALL_DEFINE5() local
106 err = user_path_at(dfd, name, lookup_flags, &path); in SYSCALL_DEFINE5()
108 err = do_sys_name_to_handle(&path, handle, mnt_id); in SYSCALL_DEFINE5()
109 path_put(&path); in SYSCALL_DEFINE5()
139 struct path *path) in do_handle_to_path() argument
[all …]
Dopen.c73 long vfs_truncate(struct path *path, loff_t length) in vfs_truncate() argument
79 inode = path->dentry->d_inode; in vfs_truncate()
80 mnt = path->mnt; in vfs_truncate()
88 error = mnt_want_write(path->mnt); in vfs_truncate()
114 error = security_path_truncate(path); in vfs_truncate()
116 error = do_truncate2(mnt, path->dentry, length, 0, NULL); in vfs_truncate()
121 mnt_drop_write(path->mnt); in vfs_truncate()
130 struct path path; in do_sys_truncate() local
137 error = user_path_at(AT_FDCWD, pathname, lookup_flags, &path); in do_sys_truncate()
139 error = vfs_truncate(&path, length); in do_sys_truncate()
[all …]
Ddcookies.c36 struct path path; member
55 return (unsigned long)dcs->path.dentry; in dcookie_value()
93 static struct dcookie_struct *alloc_dcookie(struct path *path) in alloc_dcookie() argument
101 d = path->dentry; in alloc_dcookie()
106 dcs->path = *path; in alloc_dcookie()
107 path_get(path); in alloc_dcookie()
116 int get_dcookie(struct path *path, unsigned long *cookie) in get_dcookie() argument
128 if (path->dentry->d_flags & DCACHE_COOKIE) { in get_dcookie()
129 dcs = find_dcookie((unsigned long)path->dentry); in get_dcookie()
131 dcs = alloc_dcookie(path); in get_dcookie()
[all …]
/fs/ext4/
Dextents.c141 struct ext4_ext_path *path) in ext4_ext_get_access() argument
143 if (path->p_bh) { in ext4_ext_get_access()
145 BUFFER_TRACE(path->p_bh, "get_write_access"); in ext4_ext_get_access()
146 return ext4_journal_get_write_access(handle, path->p_bh); in ext4_ext_get_access()
160 struct inode *inode, struct ext4_ext_path *path) in __ext4_ext_dirty() argument
165 if (path->p_bh) { in __ext4_ext_dirty()
166 ext4_extent_block_csum_set(inode, ext_block_hdr(path->p_bh)); in __ext4_ext_dirty()
169 inode, path->p_bh); in __ext4_ext_dirty()
178 struct ext4_ext_path *path, in ext4_ext_find_goal() argument
181 if (path) { in ext4_ext_find_goal()
[all …]
/fs/btrfs/tests/
Dqgroup-tests.c41 struct btrfs_path *path; in insert_normal_tree_ref() local
53 path = btrfs_alloc_path(); in insert_normal_tree_ref()
54 if (!path) { in insert_normal_tree_ref()
59 path->leave_spinning = 1; in insert_normal_tree_ref()
60 ret = btrfs_insert_empty_item(&trans, root, path, &ins, size); in insert_normal_tree_ref()
63 btrfs_free_path(path); in insert_normal_tree_ref()
67 leaf = path->nodes[0]; in insert_normal_tree_ref()
68 item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); in insert_normal_tree_ref()
83 btrfs_free_path(path); in insert_normal_tree_ref()
92 struct btrfs_path *path; in add_tree_ref() local
[all …]
/fs/autofs4/
Ddev-ioctl.c138 err = invalid_str(param->path, param->size - sizeof(*param)); in validate_dev_ioctl()
146 err = check_name(param->path); in validate_dev_ioctl()
195 struct path *res, in find_autofs_mount()
196 int test(struct path *path, void *data), in find_autofs_mount() argument
199 struct path path; in find_autofs_mount() local
200 int err = kern_path_mountpoint(AT_FDCWD, pathname, &path, 0); in find_autofs_mount()
204 while (path.dentry == path.mnt->mnt_root) { in find_autofs_mount()
205 if (path.dentry->d_sb->s_magic == AUTOFS_SUPER_MAGIC) { in find_autofs_mount()
206 if (test(&path, data)) { in find_autofs_mount()
207 path_get(&path); in find_autofs_mount()
[all …]
/fs/reiserfs/
Dtail_conversion.c25 struct treepath *path, struct buffer_head *unbh, in direct2indirect() argument
30 struct item_head *p_le_ih = tp_item_head(path); in direct2indirect()
65 if (search_for_position_by_key(sb, &end_key, path) == POSITION_FOUND) { in direct2indirect()
69 pathrelse(path); in direct2indirect()
73 p_le_ih = tp_item_head(path); in direct2indirect()
81 PATH_LAST_POSITION(path)++; in direct2indirect()
83 reiserfs_insert_item(th, path, &end_key, &ind_ih, inode, in direct2indirect()
87 retval = reiserfs_paste_into_item(th, path, &end_key, inode, in direct2indirect()
114 if (search_for_position_by_key(sb, &end_key, path) == in direct2indirect()
118 p_le_ih = tp_item_head(path); in direct2indirect()
[all …]
/fs/notify/fanotify/
Dfanotify.c24 old->path.mnt == new->path.mnt && in should_merge()
25 old->path.dentry == new->path.dentry) in should_merge()
96 struct path *path = data; in fanotify_should_send_event() local
107 if (!d_is_reg(path->dentry) && in fanotify_should_send_event()
108 !d_can_lookup(path->dentry)) in fanotify_should_send_event()
127 if (d_is_dir(path->dentry) && in fanotify_should_send_event()
139 struct path *path) in fanotify_alloc_event() argument
162 if (path) { in fanotify_alloc_event()
163 event->path = *path; in fanotify_alloc_event()
164 path_get(&event->path); in fanotify_alloc_event()
[all …]

123456789