Lines Matching defs:dentry

473  * Given a path increment the reference count to the dentry and the vfsmount.
478 dget(path->dentry);
486 * Given a path decrement the reference count to the dentry and the vfsmount.
490 dput(path->dentry);
499 struct inode *inode; /* path.dentry.d_inode */
509 * path_connected - Verify that a path->dentry is below path->mnt.mnt_root
523 return is_subdir(path->dentry, mnt->mnt_root);
540 * @dentry: child of nd->path.dentry or NULL
543 * unlazy_walk attempts to legitimize the current nd->path, nd->root and dentry
544 * for ref-walk mode. @dentry must be a path found by a do_lookup call on
547 static int unlazy_walk(struct nameidata *nd, struct dentry *dentry)
550 struct dentry *parent = nd->path.dentry;
558 * before returning. Do vfsmount first; if dentry
559 * can't be legitimized, just set nd->path.dentry to NULL
567 nd->path.dentry = NULL;
573 * sequence point, and it only needs to revalidate the parent dentry.
576 * dentry from the RCU domain to be properly refcounted. And the
577 * sequence number in the dentry validates *both* dentry counters,
582 if (!dentry) {
587 if (!lockref_get_not_dead(&dentry->d_lockref))
589 if (read_seqcount_retry(&dentry->d_seq, nd->seq))
599 if (nd->root.mnt != fs->root.mnt || nd->root.dentry != fs->root.dentry)
612 dput(dentry);
622 static inline int d_revalidate(struct dentry *dentry, unsigned int flags)
624 return dentry->d_op->d_revalidate(dentry, flags);
639 struct dentry *dentry = nd->path.dentry;
651 if (unlikely(!lockref_get_not_dead(&dentry->d_lockref))) {
656 if (read_seqcount_retry(&dentry->d_seq, nd->seq)) {
658 dput(dentry);
668 if (likely(!(dentry->d_flags & DCACHE_OP_WEAK_REVALIDATE)))
671 status = dentry->d_op->d_weak_revalidate(dentry, nd->flags);
697 res = __read_seqcount_begin(&nd->root.dentry->d_seq);
704 dput(path->dentry);
713 dput(nd->path.dentry);
718 nd->path.dentry = path->dentry;
730 nd->inode = nd->path.dentry->d_inode;
748 struct inode *inode = link->dentry->d_inode;
750 inode->i_op->put_link(link->dentry, nd, cookie);
782 inode = link->dentry->d_inode;
787 parent = nd->path.dentry->d_inode;
857 inode = link->dentry->d_inode;
873 struct dentry *dentry = link->dentry;
892 error = security_inode_follow_link(link->dentry, nd);
897 *p = dentry->d_inode->i_op->follow_link(dentry, nd);
918 nd->inode = nd->path.dentry->d_inode;
937 struct dentry *mountpoint;
943 path->dentry = mountpoint;
962 struct dentry *mountpoint;
973 dput(path->dentry);
974 path->dentry = mountpoint;
992 if (!path->dentry->d_op || !path->dentry->d_op->d_automount)
1008 path->dentry->d_inode)
1015 mnt = path->dentry->d_op->d_automount(path);
1020 * this so that its userspace daemon can mount on this dentry.
1048 path->dentry = dget(mnt->mnt_root);
1057 * Handle a dentry that is managed in some way.
1074 * local variable for each dentry as we look at it so that we don't see
1076 while (managed = ACCESS_ONCE(path->dentry->d_flags),
1082 BUG_ON(!path->dentry->d_op);
1083 BUG_ON(!path->dentry->d_op->d_manage);
1084 ret = path->dentry->d_op->d_manage(path->dentry, false);
1093 dput(path->dentry);
1097 path->dentry = dget(mounted->mnt_root);
1102 /* Something is mounted on this dentry in another
1133 dput(path->dentry);
1136 path->dentry = dget(mounted->mnt_root);
1143 static inline int managed_dentry_rcu(struct dentry *dentry)
1145 return (dentry->d_flags & DCACHE_MANAGE_TRANSIT) ?
1146 dentry->d_op->d_manage(dentry, true) : 0;
1151 * we meet a managed dentry that would need blocking.
1159 * Don't forget we might have a non-mountpoint managed dentry
1162 switch (managed_dentry_rcu(path->dentry)) {
1172 if (!d_mountpoint(path->dentry))
1173 return !(path->dentry->d_flags & DCACHE_NEED_AUTOMOUNT);
1175 mounted = __lookup_mnt(path->mnt, path->dentry);
1179 path->dentry = mounted->mnt.mnt_root;
1181 nd->seq = read_seqcount_begin(&path->dentry->d_seq);
1184 * dentry sequence number here after this d_inode read,
1187 *inode = path->dentry->d_inode;
1190 !(path->dentry->d_flags & DCACHE_NEED_AUTOMOUNT);
1200 if (nd->path.dentry == nd->root.dentry &&
1204 if (nd->path.dentry != nd->path.mnt->mnt_root) {
1205 struct dentry *old = nd->path.dentry;
1206 struct dentry *parent = old->d_parent;
1213 nd->path.dentry = parent;
1221 inode = nd->path.dentry->d_inode;
1222 nd->seq = read_seqcount_begin(&nd->path.dentry->d_seq);
1224 while (d_mountpoint(nd->path.dentry)) {
1226 mounted = __lookup_mnt(nd->path.mnt, nd->path.dentry);
1230 nd->path.dentry = mounted->mnt.mnt_root;
1231 inode = nd->path.dentry->d_inode;
1232 nd->seq = read_seqcount_begin(&nd->path.dentry->d_seq);
1249 * point, the filesystem owning that dentry may be queried as to whether the
1257 while (managed = ACCESS_ONCE(path->dentry->d_flags),
1270 BUG_ON(!path->dentry->d_op);
1271 BUG_ON(!path->dentry->d_op->d_manage);
1272 ret = path->dentry->d_op->d_manage(
1273 path->dentry, false);
1283 dput(path->dentry);
1286 path->dentry = dget(mounted->mnt_root);
1302 while (d_mountpoint(path->dentry)) {
1306 dput(path->dentry);
1309 path->dentry = dget(mounted->mnt_root);
1319 struct dentry *old = nd->path.dentry;
1321 if (nd->path.dentry == nd->root.dentry &&
1325 if (nd->path.dentry != nd->path.mnt->mnt_root) {
1327 nd->path.dentry = dget_parent(nd->path.dentry);
1339 nd->inode = nd->path.dentry->d_inode;
1344 * This looks up the name in dcache, possibly revalidates the old dentry and
1350 static struct dentry *lookup_dcache(struct qstr *name, struct dentry *dir,
1353 struct dentry *dentry;
1357 dentry = d_lookup(dir, name);
1358 if (dentry) {
1359 if (dentry->d_flags & DCACHE_OP_REVALIDATE) {
1360 error = d_revalidate(dentry, flags);
1363 dput(dentry);
1366 d_invalidate(dentry);
1367 dput(dentry);
1368 dentry = NULL;
1374 if (!dentry) {
1375 dentry = d_alloc(dir, name);
1376 if (unlikely(!dentry))
1381 return dentry;
1385 * Call i_op->lookup on the dentry. The dentry must be negative and
1390 static struct dentry *lookup_real(struct inode *dir, struct dentry *dentry,
1393 struct dentry *old;
1395 /* Don't create child dentry for a dead directory. */
1397 dput(dentry);
1401 old = dir->i_op->lookup(dir, dentry, flags);
1403 dput(dentry);
1404 dentry = old;
1406 return dentry;
1409 static struct dentry *__lookup_hash(struct qstr *name,
1410 struct dentry *base, unsigned int flags)
1413 struct dentry *dentry;
1415 dentry = lookup_dcache(name, base, flags, &need_lookup);
1417 return dentry;
1419 return lookup_real(base->d_inode, dentry, flags);
1431 struct dentry *dentry, *parent = nd->path.dentry;
1444 dentry = __d_lookup_rcu(parent, &nd->last, &seq);
1445 if (!dentry)
1450 * the dentry name information from lookup.
1452 *inode = dentry->d_inode;
1453 negative = d_is_negative(dentry);
1454 if (read_seqcount_retry(&dentry->d_seq, seq))
1459 * changes while we did the lookup of the dentry above.
1468 if (unlikely(dentry->d_flags & DCACHE_OP_REVALIDATE)) {
1469 status = d_revalidate(dentry, nd->flags);
1477 * Note: do negative dentry check after revalidation in
1483 path->dentry = dentry;
1487 if (unlazy_walk(nd, dentry))
1490 dentry = __d_lookup(parent, &nd->last);
1493 if (unlikely(!dentry))
1496 if (unlikely(dentry->d_flags & DCACHE_OP_REVALIDATE) && need_reval)
1497 status = d_revalidate(dentry, nd->flags);
1500 dput(dentry);
1503 d_invalidate(dentry);
1504 dput(dentry);
1508 if (unlikely(d_is_negative(dentry))) {
1509 dput(dentry);
1513 path->dentry = dentry;
1521 *inode = path->dentry->d_inode;
1531 struct dentry *dentry, *parent;
1534 parent = nd->path.dentry;
1538 dentry = __lookup_hash(&nd->last, parent, nd->flags);
1540 if (IS_ERR(dentry))
1541 return PTR_ERR(dentry);
1543 path->dentry = dentry;
1596 static inline int should_follow_link(struct dentry *dentry, int follow)
1598 return unlikely(d_is_symlink(dentry)) ? follow : 0;
1623 if (d_is_negative(path->dentry))
1625 inode = path->dentry->d_inode;
1628 if (should_follow_link(path->dentry, follow)) {
1631 unlazy_walk(nd, path->dentry))) {
1636 BUG_ON(inode != path->dentry->d_inode);
1688 * We can do the critical dentry name comparison and hashing
1806 * the final dentry. We expect 'base' to be positive and a directory.
1808 * Returns 0 and nd will have valid dentry and mnt on success.
1844 struct dentry *parent = nd->path.dentry;
1882 if (!d_can_lookup(nd->path.dentry)) {
1902 struct dentry *root = nd->root.dentry;
1915 nd->seq = __read_seqcount_begin(&nd->path.dentry->d_seq);
1945 nd->seq = __read_seqcount_begin(&nd->path.dentry->d_seq);
1953 struct dentry *dentry;
1958 dentry = f.file->f_path.dentry;
1961 if (!d_can_lookup(dentry)) {
1971 nd->seq = __read_seqcount_begin(&nd->path.dentry->d_seq);
1979 nd->inode = nd->path.dentry->d_inode;
1982 if (likely(!read_seqcount_retry(&nd->path.dentry->d_seq, nd->seq)))
2055 if (!d_can_lookup(nd->path.dentry)) {
2075 audit_inode(name, nd->path.dentry, flags & LOOKUP_PARENT);
2080 struct dentry *kern_path_locked(const char *name, struct path *path)
2084 struct dentry *d;
2100 mutex_lock_nested(&nd.path.dentry->d_inode->i_mutex, I_MUTEX_PARENT);
2101 d = __lookup_hash(&nd.last, nd.path.dentry, 0);
2103 mutex_unlock(&nd.path.dentry->d_inode->i_mutex);
2130 * vfs_path_lookup - lookup a file path relative to a dentry-vfsmount pair
2131 * @dentry: pointer to dentry of the base directory
2137 int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt,
2149 nd.root.dentry = dentry;
2166 static struct dentry *lookup_hash(struct nameidata *nd)
2168 return __lookup_hash(&nd->last, nd->path.dentry, nd->flags);
2180 struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
2291 * lookup found a negative dentry. The nd->path reference will also be
2306 struct dentry *dentry;
2307 struct dentry *dir = nd->path.dentry;
2323 dentry = dget(nd->path.dentry);
2328 dentry = d_lookup(dir, &nd->last);
2329 if (!dentry) {
2331 * No cached dentry. Mounted dentries are pinned in the cache,
2332 * so that means that this dentry is probably a symlink or the
2333 * path doesn't actually point to a mounted dentry.
2335 dentry = d_alloc(dir, &nd->last);
2336 if (!dentry) {
2341 dentry = lookup_real(dir->d_inode, dentry, nd->flags);
2342 error = PTR_ERR(dentry);
2343 if (IS_ERR(dentry)) {
2351 if (d_is_negative(dentry)) {
2353 dput(dentry);
2356 path->dentry = dentry;
2358 if (should_follow_link(dentry, nd->flags & LOOKUP_FOLLOW))
2421 audit_inode(name, path->dentry, 0);
2435 * simply want track down the dentry and vfsmount attached at the mountpoint
2486 static int may_delete(struct inode *dir, struct dentry *victim, bool isdir)
2521 /* Check whether we can create an object with dentry child in directory
2529 static inline int may_create(struct inode *dir, struct dentry *child)
2542 struct dentry *lock_rename(struct dentry *p1, struct dentry *p2)
2544 struct dentry *p;
2573 void unlock_rename(struct dentry *p1, struct dentry *p2)
2583 int vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
2586 int error = may_create(dir, dentry);
2594 error = security_inode_create(dir, dentry, mode);
2597 error = dir->i_op->create(dir, dentry, mode, want_excl);
2599 fsnotify_create(dir, dentry);
2606 struct dentry *dentry = path->dentry;
2607 struct inode *inode = dentry->d_inode;
2659 struct inode *inode = path->dentry->d_inode;
2670 error = do_truncate(path->dentry, 0,
2685 static int may_o_create(struct path *dir, struct dentry *dentry, umode_t mode)
2687 int error = security_path_mknod(dir, dentry, mode, 0);
2691 error = inode_permission(dir->dentry->d_inode, MAY_WRITE | MAY_EXEC);
2695 return security_inode_create(dir->dentry->d_inode, dentry, mode);
2700 * dentry.
2707 * updated to point to the new dentry. This may be negative.
2711 static int atomic_open(struct nameidata *nd, struct dentry *dentry,
2717 struct inode *dir = nd->path.dentry->d_inode;
2723 struct dentry *const DENTRY_NOT_SET = (void *) -1UL;
2726 BUG_ON(dentry->d_inode);
2728 /* Don't create child dentry for a dead directory. */
2771 error = may_o_create(&nd->path, dentry, mode);
2783 file->f_path.dentry = DENTRY_NOT_SET;
2785 error = dir->i_op->atomic_open(dir, dentry, file, open_flag, mode,
2794 if (WARN_ON(file->f_path.dentry == DENTRY_NOT_SET)) {
2798 if (file->f_path.dentry) {
2799 dput(dentry);
2800 dentry = file->f_path.dentry;
2803 fsnotify_create(dir, dentry);
2804 if (!dentry->d_inode) {
2826 fsnotify_create(dir, dentry);
2834 dput(dentry);
2839 dentry = lookup_real(dir, dentry, nd->flags);
2840 if (IS_ERR(dentry))
2841 return PTR_ERR(dentry);
2843 if (create_error && !dentry->d_inode) {
2848 path->dentry = dentry;
2862 * and creations will have been performed and the dentry returned in @path will
2864 * specified then a negative dentry may be returned.
2868 * FILE_CREATE will be set in @*opened if the dentry was created and will be
2876 struct dentry *dir = nd->path.dentry;
2878 struct dentry *dentry;
2883 dentry = lookup_dcache(&nd->last, dir, nd->flags, &need_lookup);
2884 if (IS_ERR(dentry))
2885 return PTR_ERR(dentry);
2887 /* Cached positive dentry: will open in f_op->open */
2888 if (!need_lookup && dentry->d_inode)
2892 return atomic_open(nd, dentry, path, file, op, got_write,
2897 BUG_ON(dentry->d_inode);
2899 dentry = lookup_real(dir_inode, dentry, nd->flags);
2900 if (IS_ERR(dentry))
2901 return PTR_ERR(dentry);
2904 /* Negative dentry, just create the file */
2905 if (!dentry->d_inode && (op->open_flag & O_CREAT)) {
2921 error = security_path_mknod(&nd->path, dentry, mode, 0);
2924 error = vfs_create(dir->d_inode, dentry, mode,
2930 path->dentry = dentry;
2935 dput(dentry);
2946 struct dentry *dir = nd->path.dentry;
2953 struct path save_parent = { .dentry = NULL, .mnt = NULL };
3022 audit_inode(name, file->f_path.dentry, 0);
3038 if (d_is_positive(path->dentry))
3039 audit_inode(name, path->dentry, 0);
3063 inode = path->dentry->d_inode;
3065 if (d_is_negative(path->dentry)) {
3069 inode = path->dentry->d_inode;
3072 if (should_follow_link(path->dentry, !symlink_ok)) {
3075 unlazy_walk(nd, path->dentry))) {
3080 BUG_ON(inode != path->dentry->d_inode);
3087 save_parent.dentry = nd->path.dentry;
3089 nd->path.dentry = path->dentry;
3100 audit_inode(name, nd->path.dentry, 0);
3102 if ((open_flag & O_CREAT) && d_is_dir(nd->path.dentry))
3105 if ((nd->flags & LOOKUP_DIRECTORY) && !d_can_lookup(nd->path.dentry))
3107 if (!d_is_reg(nd->path.dentry))
3163 if (!save_parent.dentry || retried)
3166 BUG_ON(save_parent.dentry != dir);
3171 save_parent.dentry = NULL;
3186 struct dentry *dentry, *child;
3199 dentry = nd->path.dentry;
3200 dir = dentry->d_inode;
3205 child = d_alloc(dentry, &name);
3212 dput(nd->path.dentry);
3213 nd->path.dentry = child;
3214 error = dir->i_op->tmpfile(dir, nd->path.dentry, op->mode);
3217 audit_inode(pathname, nd->path.dentry, 0);
3223 error = finish_open(file, nd->path.dentry, NULL, opened);
3320 struct file *do_file_open_root(struct dentry *dentry, struct vfsmount *mnt,
3329 nd.root.dentry = dentry;
3331 if (d_is_symlink(dentry) && op->intent & LOOKUP_OPEN)
3347 static struct dentry *filename_create(int dfd, struct filename *name,
3350 struct dentry *dentry = ERR_PTR(-EEXIST);
3380 mutex_lock_nested(&nd.path.dentry->d_inode->i_mutex, I_MUTEX_PARENT);
3381 dentry = lookup_hash(&nd);
3382 if (IS_ERR(dentry))
3386 if (d_is_positive(dentry))
3391 * From the vfs_mknod() POV we just have a negative dentry -
3404 return dentry;
3406 dput(dentry);
3407 dentry = ERR_PTR(error);
3409 mutex_unlock(&nd.path.dentry->d_inode->i_mutex);
3414 return dentry;
3417 struct dentry *kern_path_create(int dfd, const char *pathname,
3421 struct dentry *res;
3431 void done_path_create(struct path *path, struct dentry *dentry)
3433 dput(dentry);
3434 mutex_unlock(&path->dentry->d_inode->i_mutex);
3440 struct dentry *user_path_create(int dfd, const char __user *pathname,
3444 struct dentry *res;
3453 int vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
3455 int error = may_create(dir, dentry);
3470 error = security_inode_mknod(dir, dentry, mode, dev);
3474 error = dir->i_op->mknod(dir, dentry, mode, dev);
3476 fsnotify_create(dir, dentry);
3501 struct dentry *dentry;
3510 dentry = user_path_create(dfd, filename, &path, lookup_flags);
3511 if (IS_ERR(dentry))
3512 return PTR_ERR(dentry);
3514 if (!IS_POSIXACL(path.dentry->d_inode))
3516 error = security_path_mknod(&path, dentry, mode, dev);
3521 error = vfs_create(path.dentry->d_inode,dentry,mode,true);
3524 error = vfs_mknod(path.dentry->d_inode,dentry,mode,
3528 error = vfs_mknod(path.dentry->d_inode,dentry,mode,0);
3532 done_path_create(&path, dentry);
3545 int vfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
3547 int error = may_create(dir, dentry);
3557 error = security_inode_mkdir(dir, dentry, mode);
3564 error = dir->i_op->mkdir(dir, dentry, mode);
3566 fsnotify_mkdir(dir, dentry);
3573 struct dentry *dentry;
3579 dentry = user_path_create(dfd, pathname, &path, lookup_flags);
3580 if (IS_ERR(dentry))
3581 return PTR_ERR(dentry);
3583 if (!IS_POSIXACL(path.dentry->d_inode))
3585 error = security_path_mkdir(&path, dentry, mode);
3587 error = vfs_mkdir(path.dentry->d_inode, dentry, mode);
3588 done_path_create(&path, dentry);
3602 * The dentry_unhash() helper will try to drop the dentry early: we
3604 * dentry, and if that is true (possibly after pruning the dcache),
3605 * then we drop the dentry now.
3610 * if (!d_unhashed(dentry))
3616 void dentry_unhash(struct dentry *dentry)
3618 shrink_dcache_parent(dentry);
3619 spin_lock(&dentry->d_lock);
3620 if (dentry->d_lockref.count == 1)
3621 __d_drop(dentry);
3622 spin_unlock(&dentry->d_lock);
3626 int vfs_rmdir(struct inode *dir, struct dentry *dentry)
3628 int error = may_delete(dir, dentry, 1);
3636 dget(dentry);
3637 mutex_lock(&dentry->d_inode->i_mutex);
3640 if (is_local_mountpoint(dentry))
3643 error = security_inode_rmdir(dir, dentry);
3647 shrink_dcache_parent(dentry);
3648 error = dir->i_op->rmdir(dir, dentry);
3652 dentry->d_inode->i_flags |= S_DEAD;
3653 dont_mount(dentry);
3654 detach_mounts(dentry);
3657 mutex_unlock(&dentry->d_inode->i_mutex);
3658 dput(dentry);
3660 d_delete(dentry);
3669 struct dentry *dentry;
3694 mutex_lock_nested(&nd.path.dentry->d_inode->i_mutex, I_MUTEX_PARENT);
3695 dentry = lookup_hash(&nd);
3696 error = PTR_ERR(dentry);
3697 if (IS_ERR(dentry))
3699 if (!dentry->d_inode) {
3703 error = security_path_rmdir(&nd.path, dentry);
3706 error = vfs_rmdir(nd.path.dentry->d_inode, dentry);
3708 dput(dentry);
3710 mutex_unlock(&nd.path.dentry->d_inode->i_mutex);
3730 * @dentry: victim
3745 int vfs_unlink(struct inode *dir, struct dentry *dentry, struct inode **delegated_inode)
3747 struct inode *target = dentry->d_inode;
3748 int error = may_delete(dir, dentry, 0);
3757 if (is_local_mountpoint(dentry))
3760 error = security_inode_unlink(dir, dentry);
3765 error = dir->i_op->unlink(dir, dentry);
3767 dont_mount(dentry);
3768 detach_mounts(dentry);
3776 if (!error && !(dentry->d_flags & DCACHE_NFSFS_RENAMED)) {
3778 d_delete(dentry);
3795 struct dentry *dentry;
3814 mutex_lock_nested(&nd.path.dentry->d_inode->i_mutex, I_MUTEX_PARENT);
3815 dentry = lookup_hash(&nd);
3816 error = PTR_ERR(dentry);
3817 if (!IS_ERR(dentry)) {
3821 inode = dentry->d_inode;
3822 if (d_is_negative(dentry))
3825 error = security_path_unlink(&nd.path, dentry);
3828 error = vfs_unlink(nd.path.dentry->d_inode, dentry, &delegated_inode);
3830 dput(dentry);
3832 mutex_unlock(&nd.path.dentry->d_inode->i_mutex);
3853 if (d_is_negative(dentry))
3855 else if (d_is_dir(dentry))
3878 int vfs_symlink(struct inode *dir, struct dentry *dentry, const char *oldname)
3880 int error = may_create(dir, dentry);
3888 error = security_inode_symlink(dir, dentry, oldname);
3892 error = dir->i_op->symlink(dir, dentry, oldname);
3894 fsnotify_create(dir, dentry);
3904 struct dentry *dentry;
3912 dentry = user_path_create(newdfd, newname, &path, lookup_flags);
3913 error = PTR_ERR(dentry);
3914 if (IS_ERR(dentry))
3917 error = security_path_symlink(&path, dentry, from->name);
3919 error = vfs_symlink(path.dentry->d_inode, dentry, from->name);
3920 done_path_create(&path, dentry);
3954 int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_dentry, struct inode **delegated_inode)
4020 struct dentry *new_dentry;
4058 error = security_path_link(old_path.dentry, &new_path, new_dentry);
4061 error = vfs_link(old_path.dentry, new_path.dentry->d_inode, new_dentry, &delegated_inode);
4128 * has no more than 1 dentry. If "hybrid" objects will ever appear,
4130 * d) conversion from fhandle to dentry may come in the wrong moment - when
4136 int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
4137 struct inode *new_dir, struct dentry *new_dentry,
4273 struct dentry *old_dir, *new_dir;
4274 struct dentry *old_dentry, *new_dentry;
4275 struct dentry *trap;
4311 old_dir = oldnd.path.dentry;
4316 new_dir = newnd.path.dentry;
4425 int vfs_whiteout(struct inode *dir, struct dentry *dentry)
4427 int error = may_create(dir, dentry);
4434 return dir->i_op->mknod(dir, dentry,
4460 int generic_readlink(struct dentry *dentry, char __user *buffer, int buflen)
4467 cookie = dentry->d_inode->i_op->follow_link(dentry, &nd);
4472 if (dentry->d_inode->i_op->put_link)
4473 dentry->d_inode->i_op->put_link(dentry, &nd, cookie);
4479 static char *page_getlink(struct dentry * dentry, struct page **ppage)
4483 struct address_space *mapping = dentry->d_inode->i_mapping;
4489 nd_terminate_link(kaddr, dentry->d_inode->i_size, PAGE_SIZE - 1);
4493 int page_readlink(struct dentry *dentry, char __user *buffer, int buflen)
4496 int res = readlink_copy(buffer, buflen, page_getlink(dentry, &page));
4505 void *page_follow_link_light(struct dentry *dentry, struct nameidata *nd)
4508 nd_set_link(nd, page_getlink(dentry, &page));
4513 void page_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)