Lines Matching refs:nd

631 static bool nd_alloc_stack(struct nameidata *nd)
636 nd->flags & LOOKUP_RCU ? GFP_ATOMIC : GFP_KERNEL);
639 memcpy(p, nd->internal, sizeof(nd->internal));
640 nd->stack = p;
663 static void drop_links(struct nameidata *nd)
665 int i = nd->depth;
667 struct saved *last = nd->stack + i;
673 static void leave_rcu(struct nameidata *nd)
675 nd->flags &= ~LOOKUP_RCU;
676 nd->seq = nd->next_seq = 0;
680 static void terminate_walk(struct nameidata *nd)
682 drop_links(nd);
683 if (!(nd->flags & LOOKUP_RCU)) {
685 path_put(&nd->path);
686 for (i = 0; i < nd->depth; i++)
687 path_put(&nd->stack[i].link);
688 if (nd->state & ND_ROOT_GRABBED) {
689 path_put(&nd->root);
690 nd->state &= ~ND_ROOT_GRABBED;
693 leave_rcu(nd);
695 nd->depth = 0;
696 nd->path.mnt = NULL;
697 nd->path.dentry = NULL;
717 static inline bool legitimize_path(struct nameidata *nd,
720 return __legitimize_path(path, seq, nd->m_seq);
723 static bool legitimize_links(struct nameidata *nd)
726 if (unlikely(nd->flags & LOOKUP_CACHED)) {
727 drop_links(nd);
728 nd->depth = 0;
731 for (i = 0; i < nd->depth; i++) {
732 struct saved *last = nd->stack + i;
733 if (unlikely(!legitimize_path(nd, &last->link, last->seq))) {
734 drop_links(nd);
735 nd->depth = i + 1;
742 static bool legitimize_root(struct nameidata *nd)
744 /* Nothing to do if nd->root is zero or is managed by the VFS user. */
745 if (!nd->root.mnt || (nd->state & ND_ROOT_PRESET))
747 nd->state |= ND_ROOT_GRABBED;
748 return legitimize_path(nd, &nd->root, nd->root_seq);
764 * @nd: nameidata pathwalk data
767 * try_to_unlazy attempts to legitimize the current nd->path and nd->root
773 static bool try_to_unlazy(struct nameidata *nd)
775 struct dentry *parent = nd->path.dentry;
777 BUG_ON(!(nd->flags & LOOKUP_RCU));
779 if (unlikely(!legitimize_links(nd)))
781 if (unlikely(!legitimize_path(nd, &nd->path, nd->seq)))
783 if (unlikely(!legitimize_root(nd)))
785 leave_rcu(nd);
786 BUG_ON(nd->inode != parent->d_inode);
790 nd->path.mnt = NULL;
791 nd->path.dentry = NULL;
793 leave_rcu(nd);
799 * @nd: nameidata pathwalk data
805 * nd->path and nd->root for ref-walk mode. Must be called from rcu-walk context.
809 static bool try_to_unlazy_next(struct nameidata *nd, struct dentry *dentry)
812 BUG_ON(!(nd->flags & LOOKUP_RCU));
814 if (unlikely(!legitimize_links(nd)))
816 res = __legitimize_mnt(nd->path.mnt, nd->m_seq);
822 if (unlikely(!lockref_get_not_dead(&nd->path.dentry->d_lockref)))
834 if (read_seqcount_retry(&dentry->d_seq, nd->next_seq))
840 if (unlikely(!legitimize_root(nd)))
842 leave_rcu(nd);
846 nd->path.mnt = NULL;
848 nd->path.dentry = NULL;
850 leave_rcu(nd);
853 leave_rcu(nd);
868 * @nd: pointer nameidata
870 * If we had been in RCU mode, drop out of it and legitimize nd->path.
874 * need to drop nd->path.
876 static int complete_walk(struct nameidata *nd)
878 struct dentry *dentry = nd->path.dentry;
881 if (nd->flags & LOOKUP_RCU) {
883 * We don't want to zero nd->root for scoped-lookups or
884 * externally-managed nd->root.
886 if (!(nd->state & ND_ROOT_PRESET))
887 if (!(nd->flags & LOOKUP_IS_SCOPED))
888 nd->root.mnt = NULL;
889 nd->flags &= ~LOOKUP_CACHED;
890 if (!try_to_unlazy(nd))
894 if (unlikely(nd->flags & LOOKUP_IS_SCOPED)) {
911 if (!path_is_under(&nd->path, &nd->root))
915 if (likely(!(nd->state & ND_JUMPED)))
921 status = dentry->d_op->d_weak_revalidate(dentry, nd->flags);
931 static int set_root(struct nameidata *nd)
940 if (WARN_ON(nd->flags & LOOKUP_IS_SCOPED))
943 if (nd->flags & LOOKUP_RCU) {
948 nd->root = fs->root;
949 nd->root_seq = __read_seqcount_begin(&nd->root.dentry->d_seq);
952 get_fs_root(fs, &nd->root);
953 nd->state |= ND_ROOT_GRABBED;
958 static int nd_jump_root(struct nameidata *nd)
960 if (unlikely(nd->flags & LOOKUP_BENEATH))
962 if (unlikely(nd->flags & LOOKUP_NO_XDEV)) {
964 if (nd->path.mnt != NULL && nd->path.mnt != nd->root.mnt)
967 if (!nd->root.mnt) {
968 int error = set_root(nd);
972 if (nd->flags & LOOKUP_RCU) {
974 nd->path = nd->root;
975 d = nd->path.dentry;
976 nd->inode = d->d_inode;
977 nd->seq = nd->root_seq;
978 if (read_seqcount_retry(&d->d_seq, nd->seq))
981 path_put(&nd->path);
982 nd->path = nd->root;
983 path_get(&nd->path);
984 nd->inode = nd->path.dentry->d_inode;
986 nd->state |= ND_JUMPED;
997 struct nameidata *nd = current->nameidata;
999 if (unlikely(nd->flags & LOOKUP_NO_MAGICLINKS))
1003 if (unlikely(nd->flags & LOOKUP_NO_XDEV)) {
1004 if (nd->path.mnt != path->mnt)
1008 if (unlikely(nd->flags & LOOKUP_IS_SCOPED))
1011 path_put(&nd->path);
1012 nd->path = *path;
1013 nd->inode = nd->path.dentry->d_inode;
1014 nd->state |= ND_JUMPED;
1022 static inline void put_link(struct nameidata *nd)
1024 struct saved *last = nd->stack + --nd->depth;
1026 if (!(nd->flags & LOOKUP_RCU))
1086 * @nd: nameidata pathwalk data
1100 static inline int may_follow_link(struct nameidata *nd, const struct inode *inode)
1108 idmap = mnt_idmap(nd->path.mnt);
1115 if ((nd->dir_mode & (S_ISVTX|S_IWOTH)) != (S_ISVTX|S_IWOTH))
1119 if (vfsuid_valid(nd->dir_vfsuid) && vfsuid_eq(nd->dir_vfsuid, vfsuid))
1122 if (nd->flags & LOOKUP_RCU)
1125 audit_inode(nd->name, nd->stack[0].link.dentry, 0);
1214 * @nd: nameidata pathwalk data
1237 struct nameidata *nd, struct inode *const inode)
1239 umode_t dir_mode = nd->dir_mode;
1240 vfsuid_t dir_vfsuid = nd->dir_vfsuid;
1482 static bool __follow_mount_rcu(struct nameidata *nd, struct path *path)
1490 if (unlikely(nd->flags & LOOKUP_NO_XDEV))
1510 nd->state |= ND_JUMPED;
1511 nd->next_seq = read_seqcount_begin(&dentry->d_seq);
1515 if (read_seqretry(&mount_lock, nd->m_seq))
1519 if (read_seqretry(&mount_lock, nd->m_seq))
1526 static inline int handle_mounts(struct nameidata *nd, struct dentry *dentry,
1532 path->mnt = nd->path.mnt;
1534 if (nd->flags & LOOKUP_RCU) {
1535 unsigned int seq = nd->next_seq;
1536 if (likely(__follow_mount_rcu(nd, path)))
1538 // *path and nd->next_seq might've been clobbered
1539 path->mnt = nd->path.mnt;
1541 nd->next_seq = seq;
1542 if (!try_to_unlazy_next(nd, dentry))
1545 ret = traverse_mounts(path, &jumped, &nd->total_link_count, nd->flags);
1547 if (unlikely(nd->flags & LOOKUP_NO_XDEV))
1550 nd->state |= ND_JUMPED;
1554 if (path->mnt != nd->path.mnt)
1616 static struct dentry *lookup_fast(struct nameidata *nd)
1618 struct dentry *dentry, *parent = nd->path.dentry;
1626 if (nd->flags & LOOKUP_RCU) {
1627 dentry = __d_lookup_rcu(parent, &nd->last, &nd->next_seq);
1629 if (!try_to_unlazy(nd))
1638 if (read_seqcount_retry(&parent->d_seq, nd->seq))
1641 status = d_revalidate(dentry, nd->flags);
1644 if (!try_to_unlazy_next(nd, dentry))
1648 status = d_revalidate(dentry, nd->flags);
1650 dentry = __d_lookup(parent, &nd->last);
1653 status = d_revalidate(dentry, nd->flags);
1715 struct nameidata *nd)
1717 if (nd->flags & LOOKUP_RCU) {
1718 int err = inode_permission(idmap, nd->inode, MAY_EXEC|MAY_NOT_BLOCK);
1721 if (!try_to_unlazy(nd))
1726 return inode_permission(idmap, nd->inode, MAY_EXEC);
1729 static int reserve_stack(struct nameidata *nd, struct path *link)
1731 if (unlikely(nd->total_link_count++ >= MAXSYMLINKS))
1734 if (likely(nd->depth != EMBEDDED_LEVELS))
1736 if (likely(nd->stack != nd->internal))
1738 if (likely(nd_alloc_stack(nd)))
1741 if (nd->flags & LOOKUP_RCU) {
1744 bool grabbed_link = legitimize_path(nd, link, nd->next_seq);
1746 if (!try_to_unlazy(nd) || !grabbed_link)
1749 if (nd_alloc_stack(nd))
1757 static const char *pick_link(struct nameidata *nd, struct path *link,
1762 int error = reserve_stack(nd, link);
1765 if (!(nd->flags & LOOKUP_RCU))
1769 last = nd->stack + nd->depth++;
1772 last->seq = nd->next_seq;
1775 error = may_follow_link(nd, inode);
1780 if (unlikely(nd->flags & LOOKUP_NO_SYMLINKS) ||
1784 if (!(nd->flags & LOOKUP_RCU)) {
1788 if (!try_to_unlazy(nd))
1794 nd->flags & LOOKUP_RCU);
1803 if (nd->flags & LOOKUP_RCU) {
1805 if (res == ERR_PTR(-ECHILD) && try_to_unlazy(nd))
1816 error = nd_jump_root(nd);
1825 put_link(nd);
1835 * NOTE: dentry must be what nd->next_seq had been sampled from.
1837 static const char *step_into(struct nameidata *nd, int flags,
1842 int err = handle_mounts(nd, dentry, &path);
1848 ((flags & WALK_TRAILING) && !(nd->flags & LOOKUP_FOLLOW)) ||
1851 if (nd->flags & LOOKUP_RCU) {
1852 if (read_seqcount_retry(&path.dentry->d_seq, nd->next_seq))
1857 dput(nd->path.dentry);
1858 if (nd->path.mnt != path.mnt)
1859 mntput(nd->path.mnt);
1861 nd->path = path;
1862 nd->inode = inode;
1863 nd->seq = nd->next_seq;
1866 if (nd->flags & LOOKUP_RCU) {
1868 if (read_seqcount_retry(&path.dentry->d_seq, nd->next_seq))
1871 if (path.mnt == nd->path.mnt)
1874 return pick_link(nd, &path, inode, flags);
1877 static struct dentry *follow_dotdot_rcu(struct nameidata *nd)
1881 if (path_equal(&nd->path, &nd->root))
1883 if (unlikely(nd->path.dentry == nd->path.mnt->mnt_root)) {
1886 if (!choose_mountpoint_rcu(real_mount(nd->path.mnt),
1887 &nd->root, &path, &seq))
1889 if (unlikely(nd->flags & LOOKUP_NO_XDEV))
1891 nd->path = path;
1892 nd->inode = path.dentry->d_inode;
1893 nd->seq = seq;
1895 if (read_seqretry(&mount_lock, nd->m_seq))
1899 old = nd->path.dentry;
1901 nd->next_seq = read_seqcount_begin(&parent->d_seq);
1903 if (read_seqcount_retry(&old->d_seq, nd->seq))
1905 if (unlikely(!path_connected(nd->path.mnt, parent)))
1909 if (read_seqretry(&mount_lock, nd->m_seq))
1911 if (unlikely(nd->flags & LOOKUP_BENEATH))
1913 nd->next_seq = nd->seq;
1914 return nd->path.dentry;
1917 static struct dentry *follow_dotdot(struct nameidata *nd)
1921 if (path_equal(&nd->path, &nd->root))
1923 if (unlikely(nd->path.dentry == nd->path.mnt->mnt_root)) {
1926 if (!choose_mountpoint(real_mount(nd->path.mnt),
1927 &nd->root, &path))
1929 path_put(&nd->path);
1930 nd->path = path;
1931 nd->inode = path.dentry->d_inode;
1932 if (unlikely(nd->flags & LOOKUP_NO_XDEV))
1936 parent = dget_parent(nd->path.dentry);
1937 if (unlikely(!path_connected(nd->path.mnt, parent))) {
1944 if (unlikely(nd->flags & LOOKUP_BENEATH))
1946 return dget(nd->path.dentry);
1949 static const char *handle_dots(struct nameidata *nd, int type)
1955 if (!nd->root.mnt) {
1956 error = ERR_PTR(set_root(nd));
1960 if (nd->flags & LOOKUP_RCU)
1961 parent = follow_dotdot_rcu(nd);
1963 parent = follow_dotdot(nd);
1966 error = step_into(nd, WALK_NOFOLLOW, parent);
1970 if (unlikely(nd->flags & LOOKUP_IS_SCOPED)) {
1974 * above nd->root (and so userspace should retry or use
1978 if (__read_seqcount_retry(&mount_lock.seqcount, nd->m_seq))
1980 if (__read_seqcount_retry(&rename_lock.seqcount, nd->r_seq))
1987 static const char *walk_component(struct nameidata *nd, int flags)
1995 if (unlikely(nd->last_type != LAST_NORM)) {
1996 if (!(flags & WALK_MORE) && nd->depth)
1997 put_link(nd);
1998 return handle_dots(nd, nd->last_type);
2000 dentry = lookup_fast(nd);
2004 dentry = lookup_slow(&nd->last, nd->path.dentry, nd->flags);
2008 if (!(flags & WALK_MORE) && nd->depth)
2009 put_link(nd);
2010 return step_into(nd, flags, dentry);
2246 * Returns 0 and nd will have valid dentry and mnt on success.
2249 static int link_path_walk(const char *name, struct nameidata *nd)
2251 int depth = 0; // depth <= nd->depth
2254 nd->last_type = LAST_ROOT;
2255 nd->flags |= LOOKUP_PARENT;
2261 nd->dir_mode = 0; // short-circuit the 'hardening' idiocy
2272 idmap = mnt_idmap(nd->path.mnt);
2273 err = may_lookup(idmap, nd);
2277 hash_len = hash_name(nd->path.dentry, name);
2284 nd->state |= ND_JUMPED;
2291 struct dentry *parent = nd->path.dentry;
2292 nd->state &= ~ND_JUMPED;
2303 nd->last.hash_len = hash_len;
2304 nd->last.name = name;
2305 nd->last_type = type;
2321 nd->dir_vfsuid = i_uid_into_vfsuid(idmap, nd->inode);
2322 nd->dir_mode = nd->inode->i_mode;
2323 nd->flags &= ~LOOKUP_PARENT;
2327 name = nd->stack[--depth].name;
2328 link = walk_component(nd, 0);
2331 link = walk_component(nd, WALK_MORE);
2337 nd->stack[depth++].name = name;
2341 if (unlikely(!d_can_lookup(nd->path.dentry))) {
2342 if (nd->flags & LOOKUP_RCU) {
2343 if (!try_to_unlazy(nd))
2352 static const char *path_init(struct nameidata *nd, unsigned flags)
2355 const char *s = nd->name->name;
2366 nd->seq = nd->next_seq = 0;
2368 nd->flags = flags;
2369 nd->state |= ND_JUMPED;
2371 nd->m_seq = __read_seqcount_begin(&mount_lock.seqcount);
2372 nd->r_seq = __read_seqcount_begin(&rename_lock.seqcount);
2375 if (nd->state & ND_ROOT_PRESET) {
2376 struct dentry *root = nd->root.dentry;
2380 nd->path = nd->root;
2381 nd->inode = inode;
2383 nd->seq = read_seqcount_begin(&nd->path.dentry->d_seq);
2384 nd->root_seq = nd->seq;
2386 path_get(&nd->path);
2391 nd->root.mnt = NULL;
2393 /* Absolute pathname -- fetch the root (LOOKUP_IN_ROOT uses nd->dfd). */
2395 error = nd_jump_root(nd);
2402 if (nd->dfd == AT_FDCWD) {
2409 nd->path = fs->pwd;
2410 nd->inode = nd->path.dentry->d_inode;
2411 nd->seq = __read_seqcount_begin(&nd->path.dentry->d_seq);
2414 get_fs_pwd(current->fs, &nd->path);
2415 nd->inode = nd->path.dentry->d_inode;
2419 struct fd f = fdget_raw(nd->dfd);
2432 nd->path = f.file->f_path;
2434 nd->inode = nd->path.dentry->d_inode;
2435 nd->seq = read_seqcount_begin(&nd->path.dentry->d_seq);
2437 path_get(&nd->path);
2438 nd->inode = nd->path.dentry->d_inode;
2445 nd->root = nd->path;
2447 nd->root_seq = nd->seq;
2449 path_get(&nd->root);
2450 nd->state |= ND_ROOT_GRABBED;
2456 static inline const char *lookup_last(struct nameidata *nd)
2458 if (nd->last_type == LAST_NORM && nd->last.name[nd->last.len])
2459 nd->flags |= LOOKUP_FOLLOW | LOOKUP_DIRECTORY;
2461 return walk_component(nd, WALK_TRAILING);
2464 static int handle_lookup_down(struct nameidata *nd)
2466 if (!(nd->flags & LOOKUP_RCU))
2467 dget(nd->path.dentry);
2468 nd->next_seq = nd->seq;
2469 return PTR_ERR(step_into(nd, WALK_NOFOLLOW, nd->path.dentry));
2472 /* Returns 0 and nd will be valid on success; Returns error, otherwise. */
2473 static int path_lookupat(struct nameidata *nd, unsigned flags, struct path *path)
2475 const char *s = path_init(nd, flags);
2479 err = handle_lookup_down(nd);
2484 while (!(err = link_path_walk(s, nd)) &&
2485 (s = lookup_last(nd)) != NULL)
2487 if (!err && unlikely(nd->flags & LOOKUP_MOUNTPOINT)) {
2488 err = handle_lookup_down(nd);
2489 nd->state &= ~ND_JUMPED; // no d_weak_revalidate(), please...
2492 err = complete_walk(nd);
2494 if (!err && nd->flags & LOOKUP_DIRECTORY)
2495 if (!d_can_lookup(nd->path.dentry))
2498 *path = nd->path;
2499 nd->path.mnt = NULL;
2500 nd->path.dentry = NULL;
2502 terminate_walk(nd);
2510 struct nameidata nd;
2513 set_nameidata(&nd, dfd, name, root);
2514 retval = path_lookupat(&nd, flags | LOOKUP_RCU, path);
2516 retval = path_lookupat(&nd, flags, path);
2518 retval = path_lookupat(&nd, flags | LOOKUP_REVAL, path);
2527 /* Returns 0 and nd will be valid on success; Returns error, otherwise. */
2528 static int path_parentat(struct nameidata *nd, unsigned flags,
2531 const char *s = path_init(nd, flags);
2532 int err = link_path_walk(s, nd);
2534 err = complete_walk(nd);
2536 *parent = nd->path;
2537 nd->path.mnt = NULL;
2538 nd->path.dentry = NULL;
2540 terminate_walk(nd);
2551 struct nameidata nd;
2555 set_nameidata(&nd, dfd, name, root);
2556 retval = path_parentat(&nd, flags | LOOKUP_RCU, parent);
2558 retval = path_parentat(&nd, flags, parent);
2560 retval = path_parentat(&nd, flags | LOOKUP_REVAL, parent);
2562 *last = nd.last;
2563 *type = nd.last_type;
3347 static struct dentry *atomic_open(struct nameidata *nd, struct dentry *dentry,
3352 struct inode *dir = nd->path.dentry->d_inode;
3355 if (nd->flags & LOOKUP_DIRECTORY)
3359 file->f_path.mnt = nd->path.mnt;
3402 static struct dentry *lookup_open(struct nameidata *nd, struct file *file,
3407 struct dentry *dir = nd->path.dentry;
3419 dentry = d_lookup(dir, &nd->last);
3422 dentry = d_alloc_parallel(dir, &nd->last, &wq);
3429 error = d_revalidate(dentry, nd->flags);
3454 idmap = mnt_idmap(nd->path.mnt);
3460 create_error = may_o_create(idmap, &nd->path,
3468 dentry = atomic_open(nd, dentry, file, open_flag, mode);
3476 nd->flags);
3513 static const char *open_last_lookups(struct nameidata *nd,
3516 struct dentry *dir = nd->path.dentry;
3522 nd->flags |= op->intent;
3524 if (nd->last_type != LAST_NORM) {
3525 if (nd->depth)
3526 put_link(nd);
3527 return handle_dots(nd, nd->last_type);
3531 if (nd->last.name[nd->last.len])
3532 nd->flags |= LOOKUP_FOLLOW | LOOKUP_DIRECTORY;
3534 dentry = lookup_fast(nd);
3540 if (WARN_ON_ONCE(nd->flags & LOOKUP_RCU))
3544 if (nd->flags & LOOKUP_RCU) {
3545 if (!try_to_unlazy(nd))
3548 audit_inode(nd->name, dir, AUDIT_INODE_PARENT);
3550 if (unlikely(nd->last.name[nd->last.len]))
3555 got_write = !mnt_want_write(nd->path.mnt);
3566 dentry = lookup_open(nd, file, op, got_write);
3575 mnt_drop_write(nd->path.mnt);
3581 dput(nd->path.dentry);
3582 nd->path.dentry = dentry;
3587 if (nd->depth)
3588 put_link(nd);
3589 res = step_into(nd, WALK_TRAILING, dentry);
3591 nd->flags &= ~(LOOKUP_OPEN|LOOKUP_CREATE|LOOKUP_EXCL);
3598 static int do_open(struct nameidata *nd,
3608 error = complete_walk(nd);
3613 audit_inode(nd->name, nd->path.dentry, 0);
3614 idmap = mnt_idmap(nd->path.mnt);
3618 if (d_is_dir(nd->path.dentry))
3620 error = may_create_in_sticky(idmap, nd,
3621 d_backing_inode(nd->path.dentry));
3625 if ((nd->flags & LOOKUP_DIRECTORY) && !d_can_lookup(nd->path.dentry))
3634 } else if (d_is_reg(nd->path.dentry) && open_flag & O_TRUNC) {
3635 error = mnt_want_write(nd->path.mnt);
3640 error = may_open(idmap, &nd->path, acc_mode, open_flag);
3642 error = vfs_open(&nd->path, file);
3652 mnt_drop_write(nd->path.mnt);
3744 static int do_tmpfile(struct nameidata *nd, unsigned flags,
3749 int error = path_lookupat(nd, flags | LOOKUP_DIRECTORY, &path);
3759 audit_inode(nd->name, file->f_path.dentry, 0);
3767 static int do_o_path(struct nameidata *nd, unsigned flags, struct file *file)
3770 int error = path_lookupat(nd, flags, &path);
3772 audit_inode(nd->name, path.dentry, 0);
3779 static struct file *path_openat(struct nameidata *nd,
3790 error = do_tmpfile(nd, flags, op, file);
3792 error = do_o_path(nd, flags, file);
3794 const char *s = path_init(nd, flags);
3795 while (!(error = link_path_walk(s, nd)) &&
3796 (s = open_last_lookups(nd, file, op)) != NULL)
3799 error = do_open(nd, file, op);
3800 terminate_walk(nd);
3821 struct nameidata nd;
3825 set_nameidata(&nd, dfd, pathname, NULL);
3826 filp = path_openat(&nd, op, flags | LOOKUP_RCU);
3828 filp = path_openat(&nd, op, flags);
3830 filp = path_openat(&nd, op, flags | LOOKUP_REVAL);
3838 struct nameidata nd;
3850 set_nameidata(&nd, -1, filename, root);
3851 file = path_openat(&nd, op, flags | LOOKUP_RCU);
3853 file = path_openat(&nd, op, flags);
3855 file = path_openat(&nd, op, flags | LOOKUP_REVAL);