Lines Matching refs:path

467 void path_get(const struct path *path)  in path_get()  argument
469 mntget(path->mnt); in path_get()
470 dget(path->dentry); in path_get()
480 void path_put(const struct path *path) in path_put() argument
482 dput(path->dentry); in path_put()
483 mntput(path->mnt); in path_put()
489 struct path path; member
491 struct path root;
499 struct path link;
560 static bool path_connected(const struct path *path) in path_connected() argument
562 struct vfsmount *mnt = path->mnt; in path_connected()
569 return is_subdir(path->dentry, mnt->mnt_root); in path_connected()
596 path_put(&nd->path); in terminate_walk()
612 struct path *path, unsigned seq) in legitimize_path() argument
614 int res = __legitimize_mnt(path->mnt, nd->m_seq); in legitimize_path()
617 path->mnt = NULL; in legitimize_path()
618 path->dentry = NULL; in legitimize_path()
621 if (unlikely(!lockref_get_not_dead(&path->dentry->d_lockref))) { in legitimize_path()
622 path->dentry = NULL; in legitimize_path()
625 return !read_seqcount_retry(&path->dentry->d_seq, seq); in legitimize_path()
674 struct dentry *parent = nd->path.dentry; in unlazy_walk()
681 if (unlikely(!legitimize_path(nd, &nd->path, nd->seq))) in unlazy_walk()
690 nd->path.mnt = NULL; in unlazy_walk()
691 nd->path.dentry = NULL; in unlazy_walk()
717 if (unlikely(!legitimize_mnt(nd->path.mnt, nd->m_seq))) in unlazy_child()
719 if (unlikely(!lockref_get_not_dead(&nd->path.dentry->d_lockref))) in unlazy_child()
743 nd->path.mnt = NULL; in unlazy_child()
745 nd->path.dentry = NULL; in unlazy_child()
775 struct dentry *dentry = nd->path.dentry; in complete_walk()
819 static void path_put_conditional(struct path *path, struct nameidata *nd) in path_put_conditional() argument
821 dput(path->dentry); in path_put_conditional()
822 if (path->mnt != nd->path.mnt) in path_put_conditional()
823 mntput(path->mnt); in path_put_conditional()
826 static inline void path_to_nameidata(const struct path *path, in path_to_nameidata() argument
830 dput(nd->path.dentry); in path_to_nameidata()
831 if (nd->path.mnt != path->mnt) in path_to_nameidata()
832 mntput(nd->path.mnt); in path_to_nameidata()
834 nd->path.mnt = path->mnt; in path_to_nameidata()
835 nd->path.dentry = path->dentry; in path_to_nameidata()
842 nd->path = nd->root; in nd_jump_root()
843 d = nd->path.dentry; in nd_jump_root()
849 path_put(&nd->path); in nd_jump_root()
850 nd->path = nd->root; in nd_jump_root()
851 path_get(&nd->path); in nd_jump_root()
852 nd->inode = nd->path.dentry->d_inode; in nd_jump_root()
862 void nd_jump_link(struct path *path) in nd_jump_link() argument
865 path_put(&nd->path); in nd_jump_link()
867 nd->path = *path; in nd_jump_link()
868 nd->inode = nd->path.dentry->d_inode; in nd_jump_link()
979 static int may_linkat(struct path *link) in may_linkat()
1104 int follow_up(struct path *path) in follow_up() argument
1106 struct mount *mnt = real_mount(path->mnt); in follow_up()
1119 dput(path->dentry); in follow_up()
1120 path->dentry = mountpoint; in follow_up()
1121 mntput(path->mnt); in follow_up()
1122 path->mnt = &parent->mnt; in follow_up()
1132 static int follow_automount(struct path *path, struct nameidata *nd, in follow_automount() argument
1138 if (!path->dentry->d_op || !path->dentry->d_op->d_automount) in follow_automount()
1154 path->dentry->d_inode) in follow_automount()
1161 mnt = path->dentry->d_op->d_automount(path); in follow_automount()
1182 mntget(path->mnt); in follow_automount()
1185 err = finish_automount(mnt, path); in follow_automount()
1192 path_put(path); in follow_automount()
1193 path->mnt = mnt; in follow_automount()
1194 path->dentry = dget(mnt->mnt_root); in follow_automount()
1212 static int follow_managed(struct path *path, struct nameidata *nd) in follow_managed() argument
1214 struct vfsmount *mnt = path->mnt; /* held by caller, must be left alone */ in follow_managed()
1222 while (managed = READ_ONCE(path->dentry->d_flags), in follow_managed()
1228 BUG_ON(!path->dentry->d_op); in follow_managed()
1229 BUG_ON(!path->dentry->d_op->d_manage); in follow_managed()
1230 ret = path->dentry->d_op->d_manage(path, false); in follow_managed()
1237 struct vfsmount *mounted = lookup_mnt(path); in follow_managed()
1239 dput(path->dentry); in follow_managed()
1241 mntput(path->mnt); in follow_managed()
1242 path->mnt = mounted; in follow_managed()
1243 path->dentry = dget(mounted->mnt_root); in follow_managed()
1256 ret = follow_automount(path, nd, &need_mntput); in follow_managed()
1266 if (need_mntput && path->mnt == mnt) in follow_managed()
1267 mntput(path->mnt); in follow_managed()
1273 path_put_conditional(path, nd); in follow_managed()
1277 int follow_down_one(struct path *path) in follow_down_one() argument
1281 mounted = lookup_mnt(path); in follow_down_one()
1283 dput(path->dentry); in follow_down_one()
1284 mntput(path->mnt); in follow_down_one()
1285 path->mnt = mounted; in follow_down_one()
1286 path->dentry = dget(mounted->mnt_root); in follow_down_one()
1293 static inline int managed_dentry_rcu(const struct path *path) in managed_dentry_rcu() argument
1295 return (path->dentry->d_flags & DCACHE_MANAGE_TRANSIT) ? in managed_dentry_rcu()
1296 path->dentry->d_op->d_manage(path, true) : 0; in managed_dentry_rcu()
1303 static bool __follow_mount_rcu(struct nameidata *nd, struct path *path, in __follow_mount_rcu() argument
1312 switch (managed_dentry_rcu(path)) { in __follow_mount_rcu()
1322 if (!d_mountpoint(path->dentry)) in __follow_mount_rcu()
1323 return !(path->dentry->d_flags & DCACHE_NEED_AUTOMOUNT); in __follow_mount_rcu()
1325 mounted = __lookup_mnt(path->mnt, path->dentry); in __follow_mount_rcu()
1328 path->mnt = &mounted->mnt; in __follow_mount_rcu()
1329 path->dentry = mounted->mnt.mnt_root; in __follow_mount_rcu()
1331 *seqp = read_seqcount_begin(&path->dentry->d_seq); in __follow_mount_rcu()
1337 *inode = path->dentry->d_inode; in __follow_mount_rcu()
1340 !(path->dentry->d_flags & DCACHE_NEED_AUTOMOUNT); in __follow_mount_rcu()
1348 if (path_equal(&nd->path, &nd->root)) in follow_dotdot_rcu()
1350 if (nd->path.dentry != nd->path.mnt->mnt_root) { in follow_dotdot_rcu()
1351 struct dentry *old = nd->path.dentry; in follow_dotdot_rcu()
1359 nd->path.dentry = parent; in follow_dotdot_rcu()
1361 if (unlikely(!path_connected(&nd->path))) in follow_dotdot_rcu()
1365 struct mount *mnt = real_mount(nd->path.mnt); in follow_dotdot_rcu()
1372 if (&mparent->mnt == nd->path.mnt) in follow_dotdot_rcu()
1375 nd->path.dentry = mountpoint; in follow_dotdot_rcu()
1376 nd->path.mnt = &mparent->mnt; in follow_dotdot_rcu()
1381 while (unlikely(d_mountpoint(nd->path.dentry))) { in follow_dotdot_rcu()
1383 mounted = __lookup_mnt(nd->path.mnt, nd->path.dentry); in follow_dotdot_rcu()
1388 nd->path.mnt = &mounted->mnt; in follow_dotdot_rcu()
1389 nd->path.dentry = mounted->mnt.mnt_root; in follow_dotdot_rcu()
1390 inode = nd->path.dentry->d_inode; in follow_dotdot_rcu()
1391 nd->seq = read_seqcount_begin(&nd->path.dentry->d_seq); in follow_dotdot_rcu()
1402 int follow_down(struct path *path) in follow_down() argument
1407 while (managed = READ_ONCE(path->dentry->d_flags), in follow_down()
1420 BUG_ON(!path->dentry->d_op); in follow_down()
1421 BUG_ON(!path->dentry->d_op->d_manage); in follow_down()
1422 ret = path->dentry->d_op->d_manage(path, false); in follow_down()
1429 struct vfsmount *mounted = lookup_mnt(path); in follow_down()
1432 dput(path->dentry); in follow_down()
1433 mntput(path->mnt); in follow_down()
1434 path->mnt = mounted; in follow_down()
1435 path->dentry = dget(mounted->mnt_root); in follow_down()
1449 static void follow_mount(struct path *path) in follow_mount() argument
1451 while (d_mountpoint(path->dentry)) { in follow_mount()
1452 struct vfsmount *mounted = lookup_mnt(path); in follow_mount()
1455 dput(path->dentry); in follow_mount()
1456 mntput(path->mnt); in follow_mount()
1457 path->mnt = mounted; in follow_mount()
1458 path->dentry = dget(mounted->mnt_root); in follow_mount()
1462 static int path_parent_directory(struct path *path) in path_parent_directory() argument
1464 struct dentry *old = path->dentry; in path_parent_directory()
1466 path->dentry = dget_parent(path->dentry); in path_parent_directory()
1468 if (unlikely(!path_connected(path))) in path_parent_directory()
1476 if (path_equal(&nd->path, &nd->root)) in follow_dotdot()
1478 if (nd->path.dentry != nd->path.mnt->mnt_root) { in follow_dotdot()
1479 int ret = path_parent_directory(&nd->path); in follow_dotdot()
1484 if (!follow_up(&nd->path)) in follow_dotdot()
1487 follow_mount(&nd->path); in follow_dotdot()
1488 nd->inode = nd->path.dentry->d_inode; in follow_dotdot()
1547 struct path *path, struct inode **inode, in lookup_fast() argument
1550 struct vfsmount *mnt = nd->path.mnt; in lookup_fast()
1551 struct dentry *dentry, *parent = nd->path.dentry; in lookup_fast()
1598 path->mnt = mnt; in lookup_fast()
1599 path->dentry = dentry; in lookup_fast()
1600 if (likely(__follow_mount_rcu(nd, path, inode, seqp))) in lookup_fast()
1625 path->mnt = mnt; in lookup_fast()
1626 path->dentry = dentry; in lookup_fast()
1627 err = follow_managed(path, nd); in lookup_fast()
1629 *inode = d_backing_inode(path->dentry); in lookup_fast()
1710 static int pick_link(struct nameidata *nd, struct path *link, in pick_link()
1720 if (link->mnt == nd->path.mnt) in pick_link()
1730 nd->path.mnt = NULL; in pick_link()
1731 nd->path.dentry = NULL; in pick_link()
1758 static inline int step_into(struct nameidata *nd, struct path *path, in step_into() argument
1763 if (likely(!d_is_symlink(path->dentry)) || in step_into()
1766 path_to_nameidata(path, nd); in step_into()
1773 if (read_seqcount_retry(&path->dentry->d_seq, seq)) in step_into()
1776 return pick_link(nd, path, inode, seq); in step_into()
1781 struct path path; in walk_component() local
1796 err = lookup_fast(nd, &path, &inode, &seq); in walk_component()
1800 path.dentry = lookup_slow(&nd->last, nd->path.dentry, in walk_component()
1802 if (IS_ERR(path.dentry)) in walk_component()
1803 return PTR_ERR(path.dentry); in walk_component()
1805 path.mnt = nd->path.mnt; in walk_component()
1806 err = follow_managed(&path, nd); in walk_component()
1810 if (unlikely(d_is_negative(path.dentry))) { in walk_component()
1811 path_to_nameidata(&path, nd); in walk_component()
1816 inode = d_backing_inode(path.dentry); in walk_component()
1819 return step_into(nd, &path, flags, inode, seq); in walk_component()
2078 hash_len = hash_name(nd->path.dentry, name); in link_path_walk()
2092 struct dentry *parent = nd->path.dentry; in link_path_walk()
2151 if (unlikely(!d_can_lookup(nd->path.dentry))) { in link_path_walk()
2179 nd->path = nd->root; in path_init()
2182 nd->seq = __read_seqcount_begin(&nd->path.dentry->d_seq); in path_init()
2186 path_get(&nd->path); in path_init()
2192 nd->path.mnt = NULL; in path_init()
2193 nd->path.dentry = NULL; in path_init()
2208 nd->path = fs->pwd; in path_init()
2209 nd->inode = nd->path.dentry->d_inode; in path_init()
2210 nd->seq = __read_seqcount_begin(&nd->path.dentry->d_seq); in path_init()
2213 get_fs_pwd(current->fs, &nd->path); in path_init()
2214 nd->inode = nd->path.dentry->d_inode; in path_init()
2232 nd->path = f.file->f_path; in path_init()
2234 nd->inode = nd->path.dentry->d_inode; in path_init()
2235 nd->seq = read_seqcount_begin(&nd->path.dentry->d_seq); in path_init()
2237 path_get(&nd->path); in path_init()
2238 nd->inode = nd->path.dentry->d_inode; in path_init()
2268 struct path path = nd->path; in handle_lookup_down() local
2279 if (unlikely(!__follow_mount_rcu(nd, &path, &inode, &seq))) in handle_lookup_down()
2282 dget(path.dentry); in handle_lookup_down()
2283 err = follow_managed(&path, nd); in handle_lookup_down()
2286 inode = d_backing_inode(path.dentry); in handle_lookup_down()
2289 path_to_nameidata(&path, nd); in handle_lookup_down()
2296 static int path_lookupat(struct nameidata *nd, unsigned flags, struct path *path) in path_lookupat() argument
2315 if (!d_can_lookup(nd->path.dentry)) in path_lookupat()
2318 *path = nd->path; in path_lookupat()
2319 nd->path.mnt = NULL; in path_lookupat()
2320 nd->path.dentry = NULL; in path_lookupat()
2327 struct path *path, struct path *root) in filename_lookup() argument
2338 retval = path_lookupat(&nd, flags | LOOKUP_RCU, path); in filename_lookup()
2340 retval = path_lookupat(&nd, flags, path); in filename_lookup()
2342 retval = path_lookupat(&nd, flags | LOOKUP_REVAL, path); in filename_lookup()
2345 audit_inode(name, path->dentry, 0); in filename_lookup()
2353 struct path *parent) in path_parentat()
2360 *parent = nd->path; in path_parentat()
2361 nd->path.mnt = NULL; in path_parentat()
2362 nd->path.dentry = NULL; in path_parentat()
2369 unsigned int flags, struct path *parent, in filename_parentat()
2396 struct dentry *kern_path_locked(const char *name, struct path *path) in kern_path_locked() argument
2403 filename = filename_parentat(AT_FDCWD, getname_kernel(name), 0, path, in kern_path_locked()
2408 path_put(path); in kern_path_locked()
2412 inode_lock_nested(path->dentry->d_inode, I_MUTEX_PARENT); in kern_path_locked()
2413 d = __lookup_hash(&last, path->dentry, 0); in kern_path_locked()
2415 inode_unlock(path->dentry->d_inode); in kern_path_locked()
2416 path_put(path); in kern_path_locked()
2422 int kern_path(const char *name, unsigned int flags, struct path *path) in kern_path() argument
2425 flags, path, NULL); in kern_path()
2439 struct path *path) in vfs_path_lookup() argument
2441 struct path root = {.mnt = mnt, .dentry = dentry}; in vfs_path_lookup()
2444 flags , path, &root); in vfs_path_lookup()
2568 int path_pts(struct path *path) in path_pts() argument
2577 ret = path_parent_directory(path); in path_pts()
2581 parent = path->dentry; in path_pts()
2588 path->dentry = child; in path_pts()
2590 follow_mount(path); in path_pts()
2596 struct path *path, int *empty) in user_path_at_empty() argument
2599 flags, path, NULL); in user_path_at_empty()
2630 struct dentry *dir = nd->path.dentry; in mountpoint_last()
2631 struct path path; in mountpoint_last() local
2645 path.dentry = dget(nd->path.dentry); in mountpoint_last()
2647 path.dentry = d_lookup(dir, &nd->last); in mountpoint_last()
2648 if (!path.dentry) { in mountpoint_last()
2655 path.dentry = lookup_slow(&nd->last, dir, in mountpoint_last()
2657 if (IS_ERR(path.dentry)) in mountpoint_last()
2658 return PTR_ERR(path.dentry); in mountpoint_last()
2661 if (d_is_negative(path.dentry)) { in mountpoint_last()
2662 dput(path.dentry); in mountpoint_last()
2665 path.mnt = nd->path.mnt; in mountpoint_last()
2666 return step_into(nd, &path, 0, d_backing_inode(path.dentry), 0); in mountpoint_last()
2679 path_mountpoint(struct nameidata *nd, unsigned flags, struct path *path) in path_mountpoint() argument
2689 *path = nd->path; in path_mountpoint()
2690 nd->path.mnt = NULL; in path_mountpoint()
2691 nd->path.dentry = NULL; in path_mountpoint()
2692 follow_mount(path); in path_mountpoint()
2699 filename_mountpoint(int dfd, struct filename *name, struct path *path, in filename_mountpoint() argument
2707 error = path_mountpoint(&nd, flags | LOOKUP_RCU, path); in filename_mountpoint()
2709 error = path_mountpoint(&nd, flags, path); in filename_mountpoint()
2711 error = path_mountpoint(&nd, flags | LOOKUP_REVAL, path); in filename_mountpoint()
2713 audit_inode(name, path->dentry, AUDIT_INODE_NOEVAL); in filename_mountpoint()
2735 struct path *path) in user_path_mountpoint_at() argument
2737 return filename_mountpoint(dfd, getname(name), path, flags); in user_path_mountpoint_at()
2741 kern_path_mountpoint(int dfd, const char *name, struct path *path, in kern_path_mountpoint() argument
2744 return filename_mountpoint(dfd, getname_kernel(name), path, flags); in kern_path_mountpoint()
2930 bool may_open_dev(const struct path *path) in may_open_dev() argument
2932 return !(path->mnt->mnt_flags & MNT_NODEV) && in may_open_dev()
2933 !(path->mnt->mnt_sb->s_iflags & SB_I_NODEV); in may_open_dev()
2936 static int may_open(const struct path *path, int acc_mode, int flag) in may_open() argument
2938 struct dentry *dentry = path->dentry; in may_open()
2954 if (!may_open_dev(path)) in may_open()
2986 const struct path *path = &filp->f_path; in handle_truncate() local
2987 struct inode *inode = path->dentry->d_inode; in handle_truncate()
2996 error = security_path_truncate(path); in handle_truncate()
2998 error = do_truncate(path->dentry, 0, in handle_truncate()
3013 static int may_o_create(const struct path *dir, struct dentry *dentry, umode_t mode) in may_o_create()
3046 struct path *path, struct file *file, in atomic_open() argument
3051 struct inode *dir = nd->path.dentry->d_inode; in atomic_open()
3061 file->f_path.mnt = nd->path.mnt; in atomic_open()
3092 path->dentry = dentry; in atomic_open()
3093 path->mnt = nd->path.mnt; in atomic_open()
3117 static int lookup_open(struct nameidata *nd, struct path *path, in lookup_open() argument
3122 struct dentry *dir = nd->path.dentry; in lookup_open()
3177 create_error = may_o_create(&nd->path, dentry, mode); in lookup_open()
3194 error = atomic_open(nd, dentry, path, file, op, open_flag, in lookup_open()
3235 path->dentry = dentry; in lookup_open()
3236 path->mnt = nd->path.mnt; in lookup_open()
3250 struct dentry *dir = nd->path.dentry; in do_last()
3257 struct path path; in do_last() local
3274 error = lookup_fast(nd, &path, &inode, &seq); in do_last()
3301 error = mnt_want_write(nd->path.mnt); in do_last()
3314 error = lookup_open(nd, &path, file, op, got_write); in do_last()
3337 path_to_nameidata(&path, nd); in do_last()
3347 mnt_drop_write(nd->path.mnt); in do_last()
3351 error = follow_managed(&path, nd); in do_last()
3355 if (unlikely(d_is_negative(path.dentry))) { in do_last()
3356 path_to_nameidata(&path, nd); in do_last()
3363 audit_inode(nd->name, path.dentry, 0); in do_last()
3366 path_to_nameidata(&path, nd); in do_last()
3371 inode = d_backing_inode(path.dentry); in do_last()
3373 error = step_into(nd, &path, 0, inode, seq); in do_last()
3381 audit_inode(nd->name, nd->path.dentry, 0); in do_last()
3384 if (d_is_dir(nd->path.dentry)) in do_last()
3387 d_backing_inode(nd->path.dentry)); in do_last()
3392 if ((nd->flags & LOOKUP_DIRECTORY) && !d_can_lookup(nd->path.dentry)) in do_last()
3394 if (!d_is_reg(nd->path.dentry)) in do_last()
3398 error = mnt_want_write(nd->path.mnt); in do_last()
3404 error = may_open(&nd->path, acc_mode, open_flag); in do_last()
3408 error = vfs_open(&nd->path, file); in do_last()
3421 mnt_drop_write(nd->path.mnt); in do_last()
3469 struct path path; in do_tmpfile() local
3470 int error = path_lookupat(nd, flags | LOOKUP_DIRECTORY, &path); in do_tmpfile()
3473 error = mnt_want_write(path.mnt); in do_tmpfile()
3476 child = vfs_tmpfile(path.dentry, op->mode, op->open_flag); in do_tmpfile()
3480 dput(path.dentry); in do_tmpfile()
3481 path.dentry = child; in do_tmpfile()
3484 error = may_open(&path, 0, op->open_flag); in do_tmpfile()
3487 file->f_path.mnt = path.mnt; in do_tmpfile()
3490 mnt_drop_write(path.mnt); in do_tmpfile()
3492 path_put(&path); in do_tmpfile()
3498 struct path path; in do_o_path() local
3499 int error = path_lookupat(nd, flags, &path); in do_o_path()
3501 audit_inode(nd->name, path.dentry, 0); in do_o_path()
3502 error = vfs_open(&path, file); in do_o_path()
3503 path_put(&path); in do_o_path()
3594 struct path *path, unsigned int lookup_flags) in filename_create() argument
3609 name = filename_parentat(dfd, name, lookup_flags, path, &last, &type); in filename_create()
3621 err2 = mnt_want_write(path->mnt); in filename_create()
3626 inode_lock_nested(path->dentry->d_inode, I_MUTEX_PARENT); in filename_create()
3627 dentry = __lookup_hash(&last, path->dentry, lookup_flags); in filename_create()
3655 inode_unlock(path->dentry->d_inode); in filename_create()
3657 mnt_drop_write(path->mnt); in filename_create()
3659 path_put(path); in filename_create()
3665 struct path *path, unsigned int lookup_flags) in kern_path_create() argument
3668 path, lookup_flags); in kern_path_create()
3672 void done_path_create(struct path *path, struct dentry *dentry) in done_path_create() argument
3675 inode_unlock(path->dentry->d_inode); in done_path_create()
3676 mnt_drop_write(path->mnt); in done_path_create()
3677 path_put(path); in done_path_create()
3682 struct path *path, unsigned int lookup_flags) in user_path_create() argument
3684 return filename_create(dfd, getname(pathname), path, lookup_flags); in user_path_create()
3737 struct path path; in do_mknodat() local
3745 dentry = user_path_create(dfd, filename, &path, lookup_flags); in do_mknodat()
3749 if (!IS_POSIXACL(path.dentry->d_inode)) in do_mknodat()
3751 error = security_path_mknod(&path, dentry, mode, dev); in do_mknodat()
3756 error = vfs_create(path.dentry->d_inode,dentry,mode,true); in do_mknodat()
3761 error = vfs_mknod(path.dentry->d_inode,dentry,mode, in do_mknodat()
3765 error = vfs_mknod(path.dentry->d_inode,dentry,mode,0); in do_mknodat()
3769 done_path_create(&path, dentry); in do_mknodat()
3817 struct path path; in do_mkdirat() local
3822 dentry = user_path_create(dfd, pathname, &path, lookup_flags); in do_mkdirat()
3826 if (!IS_POSIXACL(path.dentry->d_inode)) in do_mkdirat()
3828 error = security_path_mkdir(&path, dentry, mode); in do_mkdirat()
3830 error = vfs_mkdir(path.dentry->d_inode, dentry, mode); in do_mkdirat()
3831 done_path_create(&path, dentry); in do_mkdirat()
3894 struct path path; in do_rmdir() local
3900 &path, &last, &type); in do_rmdir()
3916 error = mnt_want_write(path.mnt); in do_rmdir()
3920 inode_lock_nested(path.dentry->d_inode, I_MUTEX_PARENT); in do_rmdir()
3921 dentry = __lookup_hash(&last, path.dentry, lookup_flags); in do_rmdir()
3929 error = security_path_rmdir(&path, dentry); in do_rmdir()
3932 error = vfs_rmdir(path.dentry->d_inode, dentry); in do_rmdir()
3936 inode_unlock(path.dentry->d_inode); in do_rmdir()
3937 mnt_drop_write(path.mnt); in do_rmdir()
3939 path_put(&path); in do_rmdir()
4022 struct path path; in do_unlinkat() local
4029 name = filename_parentat(dfd, name, lookup_flags, &path, &last, &type); in do_unlinkat()
4037 error = mnt_want_write(path.mnt); in do_unlinkat()
4041 inode_lock_nested(path.dentry->d_inode, I_MUTEX_PARENT); in do_unlinkat()
4042 dentry = __lookup_hash(&last, path.dentry, lookup_flags); in do_unlinkat()
4052 error = security_path_unlink(&path, dentry); in do_unlinkat()
4055 error = vfs_unlink(path.dentry->d_inode, dentry, &delegated_inode); in do_unlinkat()
4059 inode_unlock(path.dentry->d_inode); in do_unlinkat()
4068 mnt_drop_write(path.mnt); in do_unlinkat()
4070 path_put(&path); in do_unlinkat()
4132 struct path path; in do_symlinkat() local
4139 dentry = user_path_create(newdfd, newname, &path, lookup_flags); in do_symlinkat()
4144 error = security_path_symlink(&path, dentry, from->name); in do_symlinkat()
4146 error = vfs_symlink(path.dentry->d_inode, dentry, from->name); in do_symlinkat()
4147 done_path_create(&path, dentry); in do_symlinkat()
4261 struct path old_path, new_path; in do_linkat()
4513 struct path old_path, new_path; in do_renameat2()