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);
500 struct inode *inode; /* path.dentry.d_inode */
564 * path_connected - Verify that a path->dentry is below path->mnt.mnt_root
578 return is_subdir(path->dentry, mnt->mnt_root);
632 path->dentry = NULL;
635 if (unlikely(!lockref_get_not_dead(&path->dentry->d_lockref))) {
636 path->dentry = NULL;
639 return !read_seqcount_retry(&path->dentry->d_seq, seq);
670 * @dentry: child of nd->path.dentry or NULL
671 * @seq: seq number to check dentry against
674 * unlazy_walk attempts to legitimize the current nd->path, nd->root and dentry
675 * for ref-walk mode. @dentry must be a path found by a do_lookup call on
680 static int unlazy_walk(struct nameidata *nd, struct dentry *dentry, unsigned seq)
682 struct dentry *parent = nd->path.dentry;
696 * sequence point, and it only needs to revalidate the parent dentry.
699 * dentry from the RCU domain to be properly refcounted. And the
700 * sequence number in the dentry validates *both* dentry counters,
705 if (!dentry) {
710 if (!lockref_get_not_dead(&dentry->d_lockref))
712 if (read_seqcount_retry(&dentry->d_seq, seq))
723 dput(dentry);
733 dput(dentry);
738 nd->path.dentry = NULL;
754 nd->path.dentry = NULL;
765 static inline int d_revalidate(struct dentry *dentry, unsigned int flags)
767 return dentry->d_op->d_revalidate(dentry, flags);
782 struct dentry *dentry = nd->path.dentry;
795 if (likely(!(dentry->d_flags & DCACHE_OP_WEAK_REVALIDATE)))
798 status = dentry->d_op->d_weak_revalidate(dentry, nd->flags);
821 nd->root_seq = __read_seqcount_begin(&nd->root.dentry->d_seq);
827 dput(path->dentry);
836 dput(nd->path.dentry);
841 nd->path.dentry = path->dentry;
854 nd->inode = nd->path.dentry->d_inode;
969 inode = link->dentry->d_inode;
985 struct dentry *dentry = last->link.dentry;
999 error = security_inode_follow_link(dentry, inode,
1011 res = inode->i_op->follow_link(dentry, &last->cookie);
1019 struct dentry *d;
1023 d = nd->path.dentry;
1034 nd->inode = nd->path.dentry->d_inode;
1059 struct dentry *mountpoint;
1070 dput(path->dentry);
1071 path->dentry = mountpoint;
1089 if (!path->dentry->d_op || !path->dentry->d_op->d_automount)
1105 path->dentry->d_inode)
1112 mnt = path->dentry->d_op->d_automount(path);
1117 * this so that its userspace daemon can mount on this dentry.
1145 path->dentry = dget(mnt->mnt_root);
1154 * Handle a dentry that is managed in some way.
1171 * local variable for each dentry as we look at it so that we don't see
1173 while (managed = ACCESS_ONCE(path->dentry->d_flags),
1179 BUG_ON(!path->dentry->d_op);
1180 BUG_ON(!path->dentry->d_op->d_manage);
1181 ret = path->dentry->d_op->d_manage(path->dentry, false);
1190 dput(path->dentry);
1194 path->dentry = dget(mounted->mnt_root);
1199 /* Something is mounted on this dentry in another
1234 dput(path->dentry);
1237 path->dentry = dget(mounted->mnt_root);
1244 static inline int managed_dentry_rcu(struct dentry *dentry)
1246 return (dentry->d_flags & DCACHE_MANAGE_TRANSIT) ?
1247 dentry->d_op->d_manage(dentry, true) : 0;
1252 * we meet a managed dentry that would need blocking.
1260 * Don't forget we might have a non-mountpoint managed dentry
1263 switch (managed_dentry_rcu(path->dentry)) {
1273 if (!d_mountpoint(path->dentry))
1274 return !(path->dentry->d_flags & DCACHE_NEED_AUTOMOUNT);
1276 mounted = __lookup_mnt(path->mnt, path->dentry);
1280 path->dentry = mounted->mnt.mnt_root;
1282 *seqp = read_seqcount_begin(&path->dentry->d_seq);
1285 * dentry sequence number here after this d_inode read,
1288 *inode = path->dentry->d_inode;
1291 !(path->dentry->d_flags & DCACHE_NEED_AUTOMOUNT);
1303 if (nd->path.dentry != nd->path.mnt->mnt_root) {
1304 struct dentry *old = nd->path.dentry;
1305 struct dentry *parent = old->d_parent;
1312 nd->path.dentry = parent;
1320 struct dentry *mountpoint = mnt->mnt_mountpoint;
1328 nd->path.dentry = mountpoint;
1334 while (unlikely(d_mountpoint(nd->path.dentry))) {
1336 mounted = __lookup_mnt(nd->path.mnt, nd->path.dentry);
1342 nd->path.dentry = mounted->mnt.mnt_root;
1343 inode = nd->path.dentry->d_inode;
1344 nd->seq = read_seqcount_begin(&nd->path.dentry->d_seq);
1352 * point, the filesystem owning that dentry may be queried as to whether the
1360 while (managed = ACCESS_ONCE(path->dentry->d_flags),
1373 BUG_ON(!path->dentry->d_op);
1374 BUG_ON(!path->dentry->d_op->d_manage);
1375 ret = path->dentry->d_op->d_manage(
1376 path->dentry, false);
1386 dput(path->dentry);
1389 path->dentry = dget(mounted->mnt_root);
1405 while (d_mountpoint(path->dentry)) {
1409 dput(path->dentry);
1412 path->dentry = dget(mounted->mnt_root);
1422 struct dentry *old = nd->path.dentry;
1424 if (nd->path.dentry == nd->root.dentry &&
1428 if (nd->path.dentry != nd->path.mnt->mnt_root) {
1430 nd->path.dentry = dget_parent(nd->path.dentry);
1440 nd->inode = nd->path.dentry->d_inode;
1445 * This looks up the name in dcache, possibly revalidates the old dentry and
1451 static struct dentry *lookup_dcache(struct qstr *name, struct dentry *dir,
1454 struct dentry *dentry;
1458 dentry = d_lookup(dir, name);
1459 if (dentry) {
1460 if (dentry->d_flags & DCACHE_OP_REVALIDATE) {
1461 error = d_revalidate(dentry, flags);
1464 dput(dentry);
1467 d_invalidate(dentry);
1468 dput(dentry);
1469 dentry = NULL;
1475 if (!dentry) {
1476 dentry = d_alloc(dir, name);
1477 if (unlikely(!dentry))
1482 return dentry;
1486 * Call i_op->lookup on the dentry. The dentry must be negative and
1491 static struct dentry *lookup_real(struct inode *dir, struct dentry *dentry,
1494 struct dentry *old;
1496 /* Don't create child dentry for a dead directory. */
1498 dput(dentry);
1502 old = dir->i_op->lookup(dir, dentry, flags);
1504 dput(dentry);
1505 dentry = old;
1507 return dentry;
1510 static struct dentry *__lookup_hash(struct qstr *name,
1511 struct dentry *base, unsigned int flags)
1514 struct dentry *dentry;
1516 dentry = lookup_dcache(name, base, flags, &need_lookup);
1518 return dentry;
1520 return lookup_real(base->d_inode, dentry, flags);
1533 struct dentry *dentry, *parent = nd->path.dentry;
1546 dentry = __d_lookup_rcu(parent, &nd->last, &seq);
1547 if (!dentry)
1552 * the dentry name information from lookup.
1554 *inode = d_backing_inode(dentry);
1555 negative = d_is_negative(dentry);
1556 if (read_seqcount_retry(&dentry->d_seq, seq))
1561 * changes while we did the lookup of the dentry above.
1570 if (unlikely(dentry->d_flags & DCACHE_OP_REVALIDATE)) {
1571 status = d_revalidate(dentry, nd->flags);
1579 * Note: do negative dentry check after revalidation in
1585 path->dentry = dentry;
1589 if (unlazy_walk(nd, dentry, seq))
1592 dentry = __d_lookup(parent, &nd->last);
1595 if (unlikely(!dentry))
1598 if (unlikely(dentry->d_flags & DCACHE_OP_REVALIDATE) && need_reval)
1599 status = d_revalidate(dentry, nd->flags);
1602 dput(dentry);
1605 d_invalidate(dentry);
1606 dput(dentry);
1610 if (unlikely(d_is_negative(dentry))) {
1611 dput(dentry);
1615 path->dentry = dentry;
1618 *inode = d_backing_inode(path->dentry);
1628 struct dentry *dentry, *parent;
1630 parent = nd->path.dentry;
1634 dentry = __lookup_hash(&nd->last, parent, nd->flags);
1636 if (IS_ERR(dentry))
1637 return PTR_ERR(dentry);
1639 path->dentry = dentry;
1710 if (likely(!d_is_symlink(link->dentry)))
1716 if (read_seqcount_retry(&link->dentry->d_seq, seq))
1752 if (d_is_negative(path.dentry))
1754 inode = d_backing_inode(path.dentry);
1773 * We can do the critical dentry name comparison and hashing
1891 * the final dentry. We expect 'base' to be positive and a directory.
1893 * Returns 0 and nd will have valid dentry and mnt on success.
1928 struct dentry *parent = nd->path.dentry;
1986 if (unlikely(!d_can_lookup(nd->path.dentry))) {
2005 struct dentry *root = nd->root.dentry;
2018 nd->seq = __read_seqcount_begin(&nd->path.dentry->d_seq);
2050 nd->seq = __read_seqcount_begin(&nd->path.dentry->d_seq);
2058 struct dentry *dentry;
2063 dentry = f.file->f_path.dentry;
2066 if (!d_can_lookup(dentry)) {
2075 nd->inode = nd->path.dentry->d_inode;
2076 nd->seq = read_seqcount_begin(&nd->path.dentry->d_seq);
2079 nd->inode = nd->path.dentry->d_inode;
2085 nd->inode = nd->path.dentry->d_inode;
2088 if (likely(!read_seqcount_retry(&nd->path.dentry->d_seq, nd->seq)))
2142 if (!d_can_lookup(nd->path.dentry))
2147 nd->path.dentry = NULL;
2172 audit_inode(name, path->dentry, flags & LOOKUP_PARENT);
2192 nd->path.dentry = NULL;
2216 audit_inode(name, parent->dentry, LOOKUP_PARENT);
2226 struct dentry *kern_path_locked(const char *name, struct path *path)
2229 struct dentry *d;
2242 mutex_lock_nested(&path->dentry->d_inode->i_mutex, I_MUTEX_PARENT);
2243 d = __lookup_hash(&last, path->dentry, 0);
2245 mutex_unlock(&path->dentry->d_inode->i_mutex);
2260 * vfs_path_lookup - lookup a file path relative to a dentry-vfsmount pair
2261 * @dentry: pointer to dentry of the base directory
2267 int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt,
2271 struct path root = {.mnt = mnt, .dentry = dentry};
2287 struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
2371 * lookup found a negative dentry. The nd->path reference will also be
2386 struct dentry *dentry;
2387 struct dentry *dir = nd->path.dentry;
2401 dentry = dget(nd->path.dentry);
2406 dentry = d_lookup(dir, &nd->last);
2407 if (!dentry) {
2409 * No cached dentry. Mounted dentries are pinned in the cache,
2410 * so that means that this dentry is probably a symlink or the
2411 * path doesn't actually point to a mounted dentry.
2413 dentry = d_alloc(dir, &nd->last);
2414 if (!dentry) {
2418 dentry = lookup_real(dir->d_inode, dentry, nd->flags);
2419 if (IS_ERR(dentry)) {
2421 return PTR_ERR(dentry);
2427 if (d_is_negative(dentry)) {
2428 dput(dentry);
2433 path->dentry = dentry;
2436 d_backing_inode(dentry), 0);
2487 audit_inode(name, path->dentry, 0);
2502 * simply want track down the dentry and vfsmount attached at the mountpoint
2553 static int may_delete(struct inode *dir, struct dentry *victim, bool isdir)
2588 /* Check whether we can create an object with dentry child in directory
2596 static inline int may_create(struct inode *dir, struct dentry *child)
2609 struct dentry *lock_rename(struct dentry *p1, struct dentry *p2)
2611 struct dentry *p;
2640 void unlock_rename(struct dentry *p1, struct dentry *p2)
2650 int vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
2653 int error = may_create(dir, dentry);
2661 error = security_inode_create(dir, dentry, mode);
2664 error = dir->i_op->create(dir, dentry, mode, want_excl);
2666 fsnotify_create(dir, dentry);
2673 struct dentry *dentry = path->dentry;
2674 struct inode *inode = dentry->d_inode;
2726 struct inode *inode = path->dentry->d_inode;
2737 error = do_truncate(path->dentry, 0,
2752 static int may_o_create(struct path *dir, struct dentry *dentry, umode_t mode)
2754 int error = security_path_mknod(dir, dentry, mode, 0);
2758 error = inode_permission(dir->dentry->d_inode, MAY_WRITE | MAY_EXEC);
2762 return security_inode_create(dir->dentry->d_inode, dentry, mode);
2767 * dentry.
2774 * updated to point to the new dentry. This may be negative.
2778 static int atomic_open(struct nameidata *nd, struct dentry *dentry,
2784 struct inode *dir = nd->path.dentry->d_inode;
2790 struct dentry *const DENTRY_NOT_SET = (void *) -1UL;
2793 BUG_ON(dentry->d_inode);
2795 /* Don't create child dentry for a dead directory. */
2838 error = may_o_create(&nd->path, dentry, mode);
2850 file->f_path.dentry = DENTRY_NOT_SET;
2852 error = dir->i_op->atomic_open(dir, dentry, file, open_flag, mode,
2861 if (WARN_ON(file->f_path.dentry == DENTRY_NOT_SET)) {
2865 if (file->f_path.dentry) {
2866 dput(dentry);
2867 dentry = file->f_path.dentry;
2870 fsnotify_create(dir, dentry);
2871 if (!dentry->d_inode) {
2893 fsnotify_create(dir, dentry);
2901 dput(dentry);
2906 dentry = lookup_real(dir, dentry, nd->flags);
2907 if (IS_ERR(dentry))
2908 return PTR_ERR(dentry);
2910 if (create_error && !dentry->d_inode) {
2915 path->dentry = dentry;
2929 * and creations will have been performed and the dentry returned in @path will
2931 * specified then a negative dentry may be returned.
2935 * FILE_CREATE will be set in @*opened if the dentry was created and will be
2943 struct dentry *dir = nd->path.dentry;
2945 struct dentry *dentry;
2950 dentry = lookup_dcache(&nd->last, dir, nd->flags, &need_lookup);
2951 if (IS_ERR(dentry))
2952 return PTR_ERR(dentry);
2954 /* Cached positive dentry: will open in f_op->open */
2955 if (!need_lookup && dentry->d_inode)
2959 return atomic_open(nd, dentry, path, file, op, got_write,
2964 BUG_ON(dentry->d_inode);
2966 dentry = lookup_real(dir_inode, dentry, nd->flags);
2967 if (IS_ERR(dentry))
2968 return PTR_ERR(dentry);
2971 /* Negative dentry, just create the file */
2972 if (!dentry->d_inode && (op->open_flag & O_CREAT)) {
2988 error = security_path_mknod(&nd->path, dentry, mode, 0);
2991 error = vfs_create(dir->d_inode, dentry, mode,
2997 path->dentry = dentry;
3002 dput(dentry);
3013 struct dentry *dir = nd->path.dentry;
3020 struct path save_parent = { .dentry = NULL, .mnt = NULL };
3087 audit_inode(nd->name, file->f_path.dentry, 0);
3103 if (d_is_positive(path.dentry))
3104 audit_inode(nd->name, path.dentry, 0);
3127 if (unlikely(d_is_negative(path.dentry))) {
3131 inode = d_backing_inode(path.dentry);
3143 save_parent.dentry = nd->path.dentry;
3145 nd->path.dentry = path.dentry;
3157 audit_inode(nd->name, nd->path.dentry, 0);
3158 if (unlikely(d_is_symlink(nd->path.dentry)) && !(open_flag & O_PATH)) {
3163 if ((open_flag & O_CREAT) && d_is_dir(nd->path.dentry))
3166 if ((nd->flags & LOOKUP_DIRECTORY) && !d_can_lookup(nd->path.dentry))
3168 if (!d_is_reg(nd->path.dentry))
3220 if (!save_parent.dentry || retried)
3223 BUG_ON(save_parent.dentry != dir);
3228 save_parent.dentry = NULL;
3242 struct dentry *child;
3251 dir = path.dentry->d_inode;
3260 child = d_alloc(path.dentry, &name);
3265 dput(path.dentry);
3266 path.dentry = child;
3363 struct file *do_file_open_root(struct dentry *dentry, struct vfsmount *mnt,
3372 nd.root.dentry = dentry;
3374 if (d_is_symlink(dentry) && op->intent & LOOKUP_OPEN)
3392 static struct dentry *filename_create(int dfd, struct filename *name,
3395 struct dentry *dentry = ERR_PTR(-EEXIST);
3425 mutex_lock_nested(&path->dentry->d_inode->i_mutex, I_MUTEX_PARENT);
3426 dentry = __lookup_hash(&last, path->dentry, lookup_flags);
3427 if (IS_ERR(dentry))
3431 if (d_is_positive(dentry))
3436 * From the vfs_mknod() POV we just have a negative dentry -
3449 return dentry;
3451 dput(dentry);
3452 dentry = ERR_PTR(error);
3454 mutex_unlock(&path->dentry->d_inode->i_mutex);
3460 return dentry;
3463 struct dentry *kern_path_create(int dfd, const char *pathname,
3471 void done_path_create(struct path *path, struct dentry *dentry)
3473 dput(dentry);
3474 mutex_unlock(&path->dentry->d_inode->i_mutex);
3480 inline struct dentry *user_path_create(int dfd, const char __user *pathname,
3487 int vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
3489 int error = may_create(dir, dentry);
3504 error = security_inode_mknod(dir, dentry, mode, dev);
3508 error = dir->i_op->mknod(dir, dentry, mode, dev);
3510 fsnotify_create(dir, dentry);
3535 struct dentry *dentry;
3544 dentry = user_path_create(dfd, filename, &path, lookup_flags);
3545 if (IS_ERR(dentry))
3546 return PTR_ERR(dentry);
3548 if (!IS_POSIXACL(path.dentry->d_inode))
3550 error = security_path_mknod(&path, dentry, mode, dev);
3555 error = vfs_create(path.dentry->d_inode,dentry,mode,true);
3558 error = vfs_mknod(path.dentry->d_inode,dentry,mode,
3562 error = vfs_mknod(path.dentry->d_inode,dentry,mode,0);
3566 done_path_create(&path, dentry);
3579 int vfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
3581 int error = may_create(dir, dentry);
3591 error = security_inode_mkdir(dir, dentry, mode);
3598 error = dir->i_op->mkdir(dir, dentry, mode);
3600 fsnotify_mkdir(dir, dentry);
3607 struct dentry *dentry;
3613 dentry = user_path_create(dfd, pathname, &path, lookup_flags);
3614 if (IS_ERR(dentry))
3615 return PTR_ERR(dentry);
3617 if (!IS_POSIXACL(path.dentry->d_inode))
3619 error = security_path_mkdir(&path, dentry, mode);
3621 error = vfs_mkdir(path.dentry->d_inode, dentry, mode);
3622 done_path_create(&path, dentry);
3636 * The dentry_unhash() helper will try to drop the dentry early: we
3638 * dentry, and if that is true (possibly after pruning the dcache),
3639 * then we drop the dentry now.
3644 * if (!d_unhashed(dentry))
3650 void dentry_unhash(struct dentry *dentry)
3652 shrink_dcache_parent(dentry);
3653 spin_lock(&dentry->d_lock);
3654 if (dentry->d_lockref.count == 1)
3655 __d_drop(dentry);
3656 spin_unlock(&dentry->d_lock);
3660 int vfs_rmdir(struct inode *dir, struct dentry *dentry)
3662 int error = may_delete(dir, dentry, 1);
3670 dget(dentry);
3671 mutex_lock(&dentry->d_inode->i_mutex);
3674 if (is_local_mountpoint(dentry))
3677 error = security_inode_rmdir(dir, dentry);
3681 shrink_dcache_parent(dentry);
3682 error = dir->i_op->rmdir(dir, dentry);
3686 dentry->d_inode->i_flags |= S_DEAD;
3687 dont_mount(dentry);
3688 detach_mounts(dentry);
3691 mutex_unlock(&dentry->d_inode->i_mutex);
3692 dput(dentry);
3694 d_delete(dentry);
3703 struct dentry *dentry;
3730 mutex_lock_nested(&path.dentry->d_inode->i_mutex, I_MUTEX_PARENT);
3731 dentry = __lookup_hash(&last, path.dentry, lookup_flags);
3732 error = PTR_ERR(dentry);
3733 if (IS_ERR(dentry))
3735 if (!dentry->d_inode) {
3739 error = security_path_rmdir(&path, dentry);
3742 error = vfs_rmdir(path.dentry->d_inode, dentry);
3744 dput(dentry);
3746 mutex_unlock(&path.dentry->d_inode->i_mutex);
3766 * @dentry: victim
3781 int vfs_unlink(struct inode *dir, struct dentry *dentry, struct inode **delegated_inode)
3783 struct inode *target = dentry->d_inode;
3784 int error = may_delete(dir, dentry, 0);
3793 if (is_local_mountpoint(dentry))
3796 error = security_inode_unlink(dir, dentry);
3801 error = dir->i_op->unlink(dir, dentry);
3803 dont_mount(dentry);
3804 detach_mounts(dentry);
3812 if (!error && !(dentry->d_flags & DCACHE_NFSFS_RENAMED)) {
3814 d_delete(dentry);
3831 struct dentry *dentry;
3852 mutex_lock_nested(&path.dentry->d_inode->i_mutex, I_MUTEX_PARENT);
3853 dentry = __lookup_hash(&last, path.dentry, lookup_flags);
3854 error = PTR_ERR(dentry);
3855 if (!IS_ERR(dentry)) {
3859 inode = dentry->d_inode;
3860 if (d_is_negative(dentry))
3863 error = security_path_unlink(&path, dentry);
3866 error = vfs_unlink(path.dentry->d_inode, dentry, &delegated_inode);
3868 dput(dentry);
3870 mutex_unlock(&path.dentry->d_inode->i_mutex);
3891 if (d_is_negative(dentry))
3893 else if (d_is_dir(dentry))
3916 int vfs_symlink(struct inode *dir, struct dentry *dentry, const char *oldname)
3918 int error = may_create(dir, dentry);
3926 error = security_inode_symlink(dir, dentry, oldname);
3930 error = dir->i_op->symlink(dir, dentry, oldname);
3932 fsnotify_create(dir, dentry);
3942 struct dentry *dentry;
3950 dentry = user_path_create(newdfd, newname, &path, lookup_flags);
3951 error = PTR_ERR(dentry);
3952 if (IS_ERR(dentry))
3955 error = security_path_symlink(&path, dentry, from->name);
3957 error = vfs_symlink(path.dentry->d_inode, dentry, from->name);
3958 done_path_create(&path, dentry);
3992 int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_dentry, struct inode **delegated_inode)
4058 struct dentry *new_dentry;
4096 error = security_path_link(old_path.dentry, &new_path, new_dentry);
4099 error = vfs_link(old_path.dentry, new_path.dentry->d_inode, new_dentry, &delegated_inode);
4166 * has no more than 1 dentry. If "hybrid" objects will ever appear,
4168 * d) conversion from fhandle to dentry may come in the wrong moment - when
4174 int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
4175 struct inode *new_dir, struct dentry *new_dentry,
4315 struct dentry *old_dentry, *new_dentry;
4316 struct dentry *trap;
4373 trap = lock_rename(new_path.dentry, old_path.dentry);
4375 old_dentry = __lookup_hash(&old_last, old_path.dentry, lookup_flags);
4383 new_dentry = __lookup_hash(&new_last, new_path.dentry, lookup_flags | target_flags);
4423 error = vfs_rename(old_path.dentry->d_inode, old_dentry,
4424 new_path.dentry->d_inode, new_dentry,
4431 unlock_rename(new_path.dentry, old_path.dentry);
4466 int vfs_whiteout(struct inode *dir, struct dentry *dentry)
4468 int error = may_create(dir, dentry);
4475 return dir->i_op->mknod(dir, dentry,
4501 int generic_readlink(struct dentry *dentry, char __user *buffer, int buflen)
4504 struct inode *inode = d_inode(dentry);
4509 link = inode->i_op->follow_link(dentry, &cookie);
4521 static char *page_getlink(struct dentry * dentry, struct page **ppage)
4525 struct address_space *mapping = dentry->d_inode->i_mapping;
4531 nd_terminate_link(kaddr, dentry->d_inode->i_size, PAGE_SIZE - 1);
4535 int page_readlink(struct dentry *dentry, char __user *buffer, int buflen)
4538 int res = readlink_copy(buffer, buflen, page_getlink(dentry, &page));
4547 const char *page_follow_link_light(struct dentry *dentry, void **cookie)
4550 char *res = page_getlink(dentry, &page);