Lines Matching defs: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 size_t dlen = dlen(dentry);
83 error = -zfs_lookup(ITOZ(dir), dname(dentry), &zp,
89 spin_lock(&dentry->d_lock);
90 dentry->d_time = jiffies;
91 spin_unlock(&dentry->d_lock);
106 return (d_splice_alias(NULL, dentry));
117 struct dentry *new_dentry;
120 if (strcmp(dname(dentry), pn.pn_buf) == 0) {
121 new_dentry = d_splice_alias(ip, dentry);
125 new_dentry = d_add_ci(dentry, ip, &ci_name);
130 return (d_splice_alias(ip, dentry));
155 is_nametoolong(struct dentry *dentry)
157 zfsvfs_t *zfsvfs = dentry->d_sb->s_fs_info;
158 size_t dlen = dlen(dentry);
167 struct dentry *dentry, umode_t mode, bool flag)
170 struct dentry *dentry, umode_t mode, bool flag)
172 zpl_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool flag)
184 if (is_nametoolong(dentry)) {
193 error = -zfs_create(ITOZ(dir), dname(dentry), vap, 0,
196 error = zpl_xattr_security_init(ZTOI(zp), dir, &dentry->d_name);
201 (void) zfs_remove(ITOZ(dir), dname(dentry), cr, 0);
205 d_instantiate(dentry, ZTOI(zp));
220 struct dentry *dentry, umode_t mode,
223 struct dentry *dentry, umode_t mode,
225 zpl_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
238 if (is_nametoolong(dentry)) {
255 error = -zfs_create(ITOZ(dir), dname(dentry), vap, 0,
258 error = zpl_xattr_security_init(ZTOI(zp), dir, &dentry->d_name);
263 (void) zfs_remove(ITOZ(dir), dname(dentry), cr, 0);
267 d_instantiate(dentry, ZTOI(zp));
289 struct dentry *dentry, umode_t mode)
291 zpl_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode)
323 &file->f_path.dentry->d_name);
325 d_tmpfile(dentry, ip);
327 error = zpl_xattr_security_init(ip, dir, &dentry->d_name);
349 zpl_unlink(struct inode *dir, struct dentry *dentry)
354 zfsvfs_t *zfsvfs = dentry->d_sb->s_fs_info;
358 error = -zfs_remove(ITOZ(dir), dname(dentry), cr, 0);
361 * For a CI FS we must invalidate the dentry to prevent the
365 d_invalidate(dentry);
377 struct dentry *dentry, umode_t mode)
380 struct dentry *dentry, umode_t mode)
382 zpl_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
394 if (is_nametoolong(dentry)) {
403 error = -zfs_mkdir(ITOZ(dir), dname(dentry), vap, &zp, cr, 0, NULL,
406 error = zpl_xattr_security_init(ZTOI(zp), dir, &dentry->d_name);
411 (void) zfs_rmdir(ITOZ(dir), dname(dentry), NULL, cr, 0);
415 d_instantiate(dentry, ZTOI(zp));
428 zpl_rmdir(struct inode *dir, struct dentry *dentry)
433 zfsvfs_t *zfsvfs = dentry->d_sb->s_fs_info;
437 error = -zfs_rmdir(ITOZ(dir), dname(dentry), NULL, cr, 0);
440 * For a CI FS we must invalidate the dentry to prevent the
444 d_invalidate(dentry);
469 struct inode *ip = path->dentry->d_inode;
520 zpl_setattr(struct user_namespace *user_ns, struct dentry *dentry,
523 zpl_setattr(struct mnt_idmap *user_ns, struct dentry *dentry,
526 zpl_setattr(struct dentry *dentry, struct iattr *ia)
529 struct inode *ip = dentry->d_inode;
536 error = zpl_setattr_prepare(user_ns, dentry, ia);
538 error = zpl_setattr_prepare(user_ns, dentry, ia);
540 error = zpl_setattr_prepare(zfs_init_idmap, dentry, ia);
594 struct dentry *sdentry, struct inode *tdip, struct dentry *tdentry,
598 struct dentry *sdentry, struct inode *tdip, struct dentry *tdentry,
601 zpl_rename2(struct inode *sdip, struct dentry *sdentry,
602 struct inode *tdip, struct dentry *tdentry, unsigned int rflags)
640 zpl_rename(struct inode *sdip, struct dentry *sdentry,
641 struct inode *tdip, struct dentry *tdentry)
650 struct dentry *dentry, const char *name)
653 struct dentry *dentry, const char *name)
655 zpl_symlink(struct inode *dir, struct dentry *dentry, const char *name)
667 if (is_nametoolong(dentry)) {
676 error = -zfs_symlink(ITOZ(dir), dname(dentry), vap,
679 error = zpl_xattr_security_init(ZTOI(zp), dir, &dentry->d_name);
681 (void) zfs_remove(ITOZ(dir), dname(dentry), cr, 0);
685 d_instantiate(dentry, ZTOI(zp));
704 zpl_get_link_common(struct dentry *dentry, struct inode *ip, char **link)
734 zpl_get_link(struct dentry *dentry, struct inode *inode,
740 if (!dentry)
743 error = zpl_get_link_common(dentry, inode, &link);
753 zpl_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
760 if (is_nametoolong(dentry)) {
773 error = -zfs_link(ITOZ(dir), ITOZ(ip), dname(dentry), cr, 0);
779 d_instantiate(dentry, ip);