• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/contrib/openzfs/module/os/linux/zfs/

Lines Matching refs:dentry

37 static struct dentry *
38 zpl_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
48 zfsvfs_t *zfsvfs = dentry->d_sb->s_fs_info;
50 if (dlen(dentry) >= ZAP_MAXNAMELEN)
63 error = -zfs_lookup(ITOZ(dir), dname(dentry), &zp,
69 spin_lock(&dentry->d_lock);
70 dentry->d_time = jiffies;
71 spin_unlock(&dentry->d_lock);
86 return (d_splice_alias(NULL, dentry));
97 struct dentry *new_dentry;
100 if (strcmp(dname(dentry), pn.pn_buf) == 0) {
101 new_dentry = d_splice_alias(ip, dentry);
105 new_dentry = d_add_ci(dentry, ip, &ci_name);
110 return (d_splice_alias(ip, dentry));
133 struct dentry *dentry, umode_t mode, bool flag)
135 zpl_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool flag)
149 error = -zfs_create(ITOZ(dir), dname(dentry), vap, 0,
152 error = zpl_xattr_security_init(ZTOI(zp), dir, &dentry->d_name);
157 (void) zfs_remove(ITOZ(dir), dname(dentry), cr, 0);
161 d_instantiate(dentry, ZTOI(zp));
176 struct dentry *dentry, umode_t mode,
178 zpl_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
201 error = -zfs_create(ITOZ(dir), dname(dentry), vap, 0,
204 error = zpl_xattr_security_init(ZTOI(zp), dir, &dentry->d_name);
209 (void) zfs_remove(ITOZ(dir), dname(dentry), cr, 0);
213 d_instantiate(dentry, ZTOI(zp));
229 struct dentry *dentry, umode_t mode)
231 zpl_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode)
255 d_tmpfile(dentry, ip);
257 error = zpl_xattr_security_init(ip, dir, &dentry->d_name);
276 zpl_unlink(struct inode *dir, struct dentry *dentry)
281 zfsvfs_t *zfsvfs = dentry->d_sb->s_fs_info;
285 error = -zfs_remove(ITOZ(dir), dname(dentry), cr, 0);
288 * For a CI FS we must invalidate the dentry to prevent the
292 d_invalidate(dentry);
304 struct dentry *dentry, umode_t mode)
306 zpl_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
320 error = -zfs_mkdir(ITOZ(dir), dname(dentry), vap, &zp, cr, 0, NULL);
322 error = zpl_xattr_security_init(ZTOI(zp), dir, &dentry->d_name);
327 (void) zfs_rmdir(ITOZ(dir), dname(dentry), NULL, cr, 0);
331 d_instantiate(dentry, ZTOI(zp));
344 zpl_rmdir(struct inode *dir, struct dentry *dentry)
349 zfsvfs_t *zfsvfs = dentry->d_sb->s_fs_info;
353 error = -zfs_rmdir(ITOZ(dir), dname(dentry), NULL, cr, 0);
356 * For a CI FS we must invalidate the dentry to prevent the
360 d_invalidate(dentry);
389 error = -zfs_getattr_fast(user_ns, path->dentry->d_inode, stat);
391 error = -zfs_getattr_fast(kcred->user_ns, path->dentry->d_inode, stat);
402 zpl_setattr(struct user_namespace *user_ns, struct dentry *dentry,
405 zpl_setattr(struct dentry *dentry, struct iattr *ia)
408 struct inode *ip = dentry->d_inode;
414 error = zpl_setattr_prepare(kcred->user_ns, dentry, ia);
448 struct dentry *sdentry, struct inode *tdip, struct dentry *tdentry,
451 zpl_rename2(struct inode *sdip, struct dentry *sdentry,
452 struct inode *tdip, struct dentry *tdentry, unsigned int flags)
476 zpl_rename(struct inode *sdip, struct dentry *sdentry,
477 struct inode *tdip, struct dentry *tdentry)
486 struct dentry *dentry, const char *name)
488 zpl_symlink(struct inode *dir, struct dentry *dentry, const char *name)
502 error = -zfs_symlink(ITOZ(dir), dname(dentry), vap,
505 error = zpl_xattr_security_init(ZTOI(zp), dir, &dentry->d_name);
507 (void) zfs_remove(ITOZ(dir), dname(dentry), cr, 0);
511 d_instantiate(dentry, ZTOI(zp));
531 zpl_put_link(struct dentry *dentry, struct nameidata *nd, void *ptr)
547 zpl_get_link_common(struct dentry *dentry, struct inode *ip, char **link)
578 zpl_get_link(struct dentry *dentry, struct inode *inode,
584 if (!dentry)
587 error = zpl_get_link_common(dentry, inode, &link);
597 zpl_get_link(struct dentry *dentry, struct inode *inode, void **cookie)
602 if (!dentry)
605 error = zpl_get_link_common(dentry, inode, &link);
613 zpl_follow_link(struct dentry *dentry, void **cookie)
618 error = zpl_get_link_common(dentry, dentry->d_inode, &link);
626 zpl_follow_link(struct dentry *dentry, struct nameidata *nd)
631 error = zpl_get_link_common(dentry, dentry->d_inode, &link);
642 zpl_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
658 error = -zfs_link(ITOZ(dir), ITOZ(ip), dname(dentry), cr, 0);
664 d_instantiate(dentry, ip);
675 zpl_revalidate(struct dentry *dentry, struct nameidata *nd)
679 zpl_revalidate(struct dentry *dentry, unsigned int flags)
683 zfsvfs_t *zfsvfs = dentry->d_sb->s_fs_info;
694 if (dentry->d_inode == NULL) {
695 spin_lock(&dentry->d_lock);
696 error = time_before(dentry->d_time, zfsvfs->z_rollback_time);
697 spin_unlock(&dentry->d_lock);
704 * The dentry may reference a stale inode if a mounted file system
707 if (dentry->d_inode && ITOZ(dentry->d_inode)->z_is_stale)