Home
last modified time | relevance | path

Searched refs:dentry (Results 1 – 25 of 539) sorted by relevance

12345678910>>...22

/fs/
Ddcache.c111 static inline struct hlist_bl_head *in_lookup_hash(const struct dentry *parent, in in_lookup_hash()
233 static inline int dentry_cmp(const struct dentry *dentry, const unsigned char *ct, unsigned tcount) in dentry_cmp() argument
251 const unsigned char *cs = READ_ONCE(dentry->d_name.name); in dentry_cmp()
264 static inline struct external_name *external_name(struct dentry *dentry) in external_name() argument
266 return container_of(dentry->d_name.name, struct external_name, name[0]); in external_name()
271 struct dentry *dentry = container_of(head, struct dentry, d_u.d_rcu); in __d_free() local
273 kmem_cache_free(dentry_cache, dentry); in __d_free()
278 struct dentry *dentry = container_of(head, struct dentry, d_u.d_rcu); in __d_free_external() local
279 kfree(external_name(dentry)); in __d_free_external()
280 kmem_cache_free(dentry_cache, dentry); in __d_free_external()
[all …]
Dnamei.c547 dget(path->dentry); in path_get()
559 dput(path->dentry); in path_put()
601 p->path.dentry = NULL; in __set_nameidata()
648 static bool path_connected(struct vfsmount *mnt, struct dentry *dentry) in path_connected() argument
656 return is_subdir(dentry, mnt->mnt_root); in path_connected()
687 nd->path.dentry = NULL; in terminate_walk()
697 path->dentry = NULL; in __legitimize_path()
700 if (unlikely(!lockref_get_not_dead(&path->dentry->d_lockref))) { in __legitimize_path()
701 path->dentry = NULL; in __legitimize_path()
704 return !read_seqcount_retry(&path->dentry->d_seq, seq); in __legitimize_path()
[all …]
/fs/overlayfs/
Doverlayfs.h125 static inline int ovl_do_rmdir(struct inode *dir, struct dentry *dentry) in ovl_do_rmdir() argument
127 int err = vfs_rmdir(&init_user_ns, dir, dentry); in ovl_do_rmdir()
129 pr_debug("rmdir(%pd2) = %i\n", dentry, err); in ovl_do_rmdir()
133 static inline int ovl_do_unlink(struct inode *dir, struct dentry *dentry) in ovl_do_unlink() argument
135 int err = vfs_unlink(&init_user_ns, dir, dentry, NULL); in ovl_do_unlink()
137 pr_debug("unlink(%pd2) = %i\n", dentry, err); in ovl_do_unlink()
141 static inline int ovl_do_link(struct dentry *old_dentry, struct inode *dir, in ovl_do_link()
142 struct dentry *new_dentry) in ovl_do_link()
150 static inline int ovl_do_create(struct inode *dir, struct dentry *dentry, in ovl_do_create() argument
153 int err = vfs_create(&init_user_ns, dir, dentry, mode, true); in ovl_do_create()
[all …]
Dutil.c19 int ovl_want_write(struct dentry *dentry) in ovl_want_write() argument
21 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_want_write()
25 void ovl_drop_write(struct dentry *dentry) in ovl_drop_write() argument
27 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_drop_write()
31 struct dentry *ovl_workdir(struct dentry *dentry) in ovl_workdir() argument
33 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_workdir()
72 struct dentry *ovl_indexdir(struct super_block *sb) in ovl_indexdir()
108 bool ovl_dentry_remote(struct dentry *dentry) in ovl_dentry_remote() argument
110 return dentry->d_flags & OVL_D_REVALIDATE; in ovl_dentry_remote()
113 void ovl_dentry_update_reval(struct dentry *dentry, struct dentry *realdentry) in ovl_dentry_update_reval() argument
[all …]
Ddir.c24 static int ovl_set_redirect(struct dentry *dentry, bool samedir);
26 int ovl_cleanup(struct inode *wdir, struct dentry *wdentry) in ovl_cleanup()
45 struct dentry *ovl_lookup_temp(struct dentry *workdir) in ovl_lookup_temp()
47 struct dentry *temp; in ovl_lookup_temp()
65 static struct dentry *ovl_whiteout(struct ovl_fs *ofs) in ovl_whiteout()
68 struct dentry *whiteout; in ovl_whiteout()
69 struct dentry *workdir = ofs->workdir; in ovl_whiteout()
110 struct dentry *dentry) in ovl_cleanup_and_whiteout() argument
113 struct dentry *whiteout; in ovl_cleanup_and_whiteout()
122 if (d_is_dir(dentry)) in ovl_cleanup_and_whiteout()
[all …]
Dexport.c19 static int ovl_encode_maybe_copy_up(struct dentry *dentry) in ovl_encode_maybe_copy_up() argument
23 if (ovl_dentry_upper(dentry)) in ovl_encode_maybe_copy_up()
26 err = ovl_want_write(dentry); in ovl_encode_maybe_copy_up()
28 err = ovl_copy_up(dentry); in ovl_encode_maybe_copy_up()
29 ovl_drop_write(dentry); in ovl_encode_maybe_copy_up()
34 dentry, err); in ovl_encode_maybe_copy_up()
77 static int ovl_connectable_layer(struct dentry *dentry) in ovl_connectable_layer() argument
79 struct ovl_entry *oe = OVL_E(dentry); in ovl_connectable_layer()
82 if (dentry == dentry->d_sb->s_root) in ovl_connectable_layer()
89 if (ovl_dentry_upper(dentry) && in ovl_connectable_layer()
[all …]
Dcopy_up.c47 int ovl_copy_xattr(struct super_block *sb, struct dentry *old, in ovl_copy_xattr()
48 struct dentry *new) in ovl_copy_xattr()
148 old->dentry, err); in ovl_copy_fileattr()
159 err = ovl_set_protattr(inode, new->dentry, &oldfa); in ovl_copy_fileattr()
181 new->dentry, err); in ovl_copy_fileattr()
295 static int ovl_set_size(struct dentry *upperdentry, struct kstat *stat) in ovl_set_size()
305 static int ovl_set_timestamps(struct dentry *upperdentry, struct kstat *stat) in ovl_set_timestamps()
317 int ovl_set_attr(struct dentry *upperdentry, struct kstat *stat) in ovl_set_attr()
342 struct ovl_fh *ovl_encode_real_fh(struct ovl_fs *ofs, struct dentry *real, in ovl_encode_real_fh()
397 int ovl_set_origin(struct ovl_fs *ofs, struct dentry *lower, in ovl_set_origin()
[all …]
Dnamei.c28 static int ovl_check_redirect(struct dentry *dentry, struct ovl_lookup_data *d, in ovl_check_redirect() argument
35 buf = ovl_get_redirect_xattr(ofs, dentry, prelen + strlen(post)); in ovl_check_redirect()
64 static int ovl_acceptable(void *ctx, struct dentry *dentry) in ovl_acceptable() argument
70 if (!d_is_dir(dentry)) in ovl_acceptable()
74 if (d_unhashed(dentry)) in ovl_acceptable()
78 return is_subdir(dentry, ((struct vfsmount *)ctx)->mnt_root); in ovl_acceptable()
108 static struct ovl_fh *ovl_get_fh(struct ovl_fs *ofs, struct dentry *dentry, in ovl_get_fh() argument
114 res = ovl_do_getxattr(ofs, dentry, ox, NULL, 0); in ovl_get_fh()
128 res = ovl_do_getxattr(ofs, dentry, ox, fh->buf, res); in ovl_get_fh()
153 struct dentry *ovl_decode_real_fh(struct ovl_fs *ofs, struct ovl_fh *fh, in ovl_decode_real_fh()
[all …]
Dinode.c20 int ovl_setattr(struct user_namespace *mnt_userns, struct dentry *dentry, in ovl_setattr() argument
25 struct dentry *upperdentry; in ovl_setattr()
28 err = setattr_prepare(&init_user_ns, dentry, attr); in ovl_setattr()
32 err = ovl_want_write(dentry); in ovl_setattr()
42 err = ovl_copy_up(dentry); in ovl_setattr()
44 err = ovl_copy_up_with_data(dentry); in ovl_setattr()
48 upperdentry = ovl_dentry_upper(dentry); in ovl_setattr()
79 old_cred = ovl_override_creds(dentry->d_sb); in ovl_setattr()
81 ovl_revert_creds(dentry->d_sb, old_cred); in ovl_setattr()
83 ovl_copyattr(dentry->d_inode); in ovl_setattr()
[all …]
/fs/debugfs/
Dinode.c46 struct dentry *dentry, struct iattr *ia) in debugfs_setattr() argument
55 return simple_setattr(&init_user_ns, dentry, ia); in debugfs_setattr()
184 static int debugfs_show_options(struct seq_file *m, struct dentry *root) in debugfs_show_options()
215 static void debugfs_release_dentry(struct dentry *dentry) in debugfs_release_dentry() argument
217 struct debugfs_fsdata *fsd = dentry->d_fsdata; in debugfs_release_dentry()
227 struct debugfs_fsdata *fsd = path->dentry->d_fsdata; in debugfs_automount()
229 return fsd->automount(path->dentry, d_inode(path->dentry)->i_private); in debugfs_automount()
272 static struct dentry *debug_mount(struct file_system_type *fs_type, in debug_mount()
302 struct dentry *debugfs_lookup(const char *name, struct dentry *parent) in debugfs_lookup()
304 struct dentry *dentry; in debugfs_lookup() local
[all …]
/fs/autofs/
Droot.c14 struct dentry *, const char *);
15 static int autofs_dir_unlink(struct inode *, struct dentry *);
16 static int autofs_dir_rmdir(struct inode *, struct dentry *);
18 struct dentry *, umode_t);
25 static struct dentry *autofs_lookup(struct inode *,
26 struct dentry *, unsigned int);
29 static void autofs_dentry_release(struct dentry *);
65 static void autofs_del_active(struct dentry *dentry) in autofs_del_active() argument
67 struct autofs_sb_info *sbi = autofs_sbi(dentry->d_sb); in autofs_del_active()
70 ino = autofs_dentry_ino(dentry); in autofs_del_active()
[all …]
Dexpire.c11 static inline int autofs_can_expire(struct dentry *dentry, in autofs_can_expire() argument
14 struct autofs_info *ino = autofs_dentry_ino(dentry); in autofs_can_expire()
30 struct dentry *dentry, unsigned int how) in autofs_mount_busy() argument
32 struct dentry *top = dentry; in autofs_mount_busy()
33 struct path path = {.mnt = mnt, .dentry = dentry}; in autofs_mount_busy()
36 pr_debug("dentry %p %pd\n", dentry, dentry); in autofs_mount_busy()
43 if (is_autofs_dentry(path.dentry)) { in autofs_mount_busy()
44 struct autofs_sb_info *sbi = autofs_sbi(path.dentry->d_sb); in autofs_mount_busy()
74 static struct dentry *positive_after(struct dentry *p, struct dentry *child) in positive_after()
79 child = list_first_entry(&p->d_subdirs, struct dentry, d_child); in positive_after()
[all …]
/fs/ocfs2/
Ddcache.c26 void ocfs2_dentry_attach_gen(struct dentry *dentry) in ocfs2_dentry_attach_gen() argument
29 OCFS2_I(d_inode(dentry->d_parent))->ip_dir_lock_gen; in ocfs2_dentry_attach_gen()
30 BUG_ON(d_inode(dentry)); in ocfs2_dentry_attach_gen()
31 dentry->d_fsdata = (void *)gen; in ocfs2_dentry_attach_gen()
35 static int ocfs2_dentry_revalidate(struct dentry *dentry, unsigned int flags) in ocfs2_dentry_revalidate() argument
44 inode = d_inode(dentry); in ocfs2_dentry_revalidate()
45 osb = OCFS2_SB(dentry->d_sb); in ocfs2_dentry_revalidate()
47 trace_ocfs2_dentry_revalidate(dentry, dentry->d_name.len, in ocfs2_dentry_revalidate()
48 dentry->d_name.name); in ocfs2_dentry_revalidate()
55 unsigned long gen = (unsigned long) dentry->d_fsdata; in ocfs2_dentry_revalidate()
[all …]
/fs/tracefs/
Dinode.c55 static char *get_dname(struct dentry *dentry) in get_dname() argument
59 int len = dentry->d_name.len; in get_dname()
61 dname = dentry->d_name.name; in get_dname()
71 struct inode *inode, struct dentry *dentry, in tracefs_syscall_mkdir() argument
77 name = get_dname(dentry); in tracefs_syscall_mkdir()
95 static int tracefs_syscall_rmdir(struct inode *inode, struct dentry *dentry) in tracefs_syscall_rmdir() argument
100 name = get_dname(dentry); in tracefs_syscall_rmdir()
112 inode_unlock(dentry->d_inode); in tracefs_syscall_rmdir()
117 inode_lock(dentry->d_inode); in tracefs_syscall_rmdir()
166 static void change_gid(struct dentry *dentry, kgid_t gid) in change_gid() argument
[all …]
/fs/ecryptfs/
Dinode.c25 static int lock_parent(struct dentry *dentry, in lock_parent() argument
26 struct dentry **lower_dentry, in lock_parent()
29 struct dentry *lower_dir_dentry; in lock_parent()
31 lower_dir_dentry = ecryptfs_dentry_to_lower(dentry->d_parent); in lock_parent()
33 *lower_dentry = ecryptfs_dentry_to_lower(dentry); in lock_parent()
123 static int ecryptfs_interpose(struct dentry *lower_dentry, in ecryptfs_interpose()
124 struct dentry *dentry, struct super_block *sb) in ecryptfs_interpose() argument
130 d_instantiate(dentry, inode); in ecryptfs_interpose()
135 static int ecryptfs_do_unlink(struct inode *dir, struct dentry *dentry, in ecryptfs_do_unlink() argument
138 struct dentry *lower_dentry; in ecryptfs_do_unlink()
[all …]
/fs/exportfs/
Dexpfs.c24 static int get_name(const struct path *path, char *name, struct dentry *child);
27 static int exportfs_get_name(struct vfsmount *mnt, struct dentry *dir, in exportfs_get_name()
28 char *name, struct dentry *child) in exportfs_get_name()
31 struct path path = {.mnt = mnt, .dentry = dir}; in exportfs_get_name()
42 static struct dentry *
43 find_acceptable_alias(struct dentry *result, in find_acceptable_alias()
44 int (*acceptable)(void *context, struct dentry *dentry), in find_acceptable_alias() argument
47 struct dentry *dentry, *toput = NULL; in find_acceptable_alias() local
55 hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) { in find_acceptable_alias()
56 dget(dentry); in find_acceptable_alias()
[all …]
/fs/ceph/
Ddir.c33 static int __dir_lease_try_check(const struct dentry *dentry);
38 static int ceph_d_init(struct dentry *dentry) in ceph_d_init() argument
41 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dentry->d_sb); in ceph_d_init()
47 di->dentry = dentry; in ceph_d_init()
50 dentry->d_fsdata = di; in ceph_d_init()
127 static struct dentry *
128 __dcache_find_get_entry(struct dentry *parent, u64 idx, in __dcache_find_get_entry()
132 struct dentry *dentry; in __dcache_find_get_entry() local
133 unsigned idx_mask = (PAGE_SIZE / sizeof(struct dentry *)) - 1; in __dcache_find_get_entry()
134 loff_t ptr_pos = idx * sizeof(struct dentry *); in __dcache_find_get_entry()
[all …]
/fs/reiserfs/
Dxattr.c66 static int xattr_create(struct inode *dir, struct dentry *dentry, int mode) in xattr_create() argument
69 return dir->i_op->create(&init_user_ns, dir, dentry, mode, true); in xattr_create()
73 static int xattr_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) in xattr_mkdir() argument
76 return dir->i_op->mkdir(&init_user_ns, dir, dentry, mode); in xattr_mkdir()
85 static int xattr_unlink(struct inode *dir, struct dentry *dentry) in xattr_unlink() argument
91 inode_lock_nested(d_inode(dentry), I_MUTEX_CHILD); in xattr_unlink()
92 error = dir->i_op->unlink(dir, dentry); in xattr_unlink()
93 inode_unlock(d_inode(dentry)); in xattr_unlink()
96 d_delete(dentry); in xattr_unlink()
100 static int xattr_rmdir(struct inode *dir, struct dentry *dentry) in xattr_rmdir() argument
[all …]
/fs/configfs/
Ddir.c45 static void configfs_d_iput(struct dentry * dentry, in configfs_d_iput() argument
48 struct configfs_dirent *sd = dentry->d_fsdata; in configfs_d_iput()
59 if (sd->s_dentry == dentry) in configfs_d_iput()
243 struct dentry * dentry, void * element, in configfs_make_dirent() argument
253 sd->s_dentry = dentry; in configfs_make_dirent()
254 if (dentry) in configfs_make_dirent()
255 dentry->d_fsdata = configfs_get(sd); in configfs_make_dirent()
260 static void configfs_remove_dirent(struct dentry *dentry) in configfs_remove_dirent() argument
262 struct configfs_dirent *sd = dentry->d_fsdata; in configfs_remove_dirent()
282 static int configfs_create_dir(struct config_item *item, struct dentry *dentry, in configfs_create_dir() argument
[all …]
/fs/nfsd/
Dnfsfh.c28 static int nfsd_acceptable(void *expv, struct dentry *dentry) in nfsd_acceptable() argument
32 struct dentry *tdentry; in nfsd_acceptable()
33 struct dentry *parent; in nfsd_acceptable()
38 tdentry = dget(dentry); in nfsd_acceptable()
39 while (tdentry != exp->ex_path.dentry && !IS_ROOT(tdentry)) { in nfsd_acceptable()
52 if (tdentry != exp->ex_path.dentry) in nfsd_acceptable()
54 rv = (tdentry == exp->ex_path.dentry); in nfsd_acceptable()
65 nfsd_mode_check(struct svc_rqst *rqstp, struct dentry *dentry, in nfsd_mode_check() argument
68 umode_t mode = d_inode(dentry)->i_mode & S_IFMT; in nfsd_mode_check()
73 if (mode == S_IFDIR && !d_can_lookup(dentry)) { in nfsd_mode_check()
[all …]
/fs/9p/
Dfid.c22 static inline void __add_fid(struct dentry *dentry, struct p9_fid *fid) in __add_fid() argument
24 hlist_add_head(&fid->dlist, (struct hlist_head *)&dentry->d_fsdata); in __add_fid()
34 void v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid) in v9fs_fid_add() argument
36 spin_lock(&dentry->d_lock); in v9fs_fid_add()
37 __add_fid(dentry, fid); in v9fs_fid_add()
38 spin_unlock(&dentry->d_lock); in v9fs_fid_add()
91 static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any) in v9fs_fid_find() argument
96 dentry, dentry, from_kuid(&init_user_ns, uid), in v9fs_fid_find()
100 if (dentry->d_fsdata) { in v9fs_fid_find()
101 struct hlist_head *h = (struct hlist_head *)&dentry->d_fsdata; in v9fs_fid_find()
[all …]
/fs/cachefiles/
Dxattr.c27 struct dentry *dentry = object->dentry; in cachefiles_check_object_type() local
31 ASSERT(dentry); in cachefiles_check_object_type()
32 ASSERT(d_backing_inode(dentry)); in cachefiles_check_object_type()
42 ret = vfs_setxattr(&init_user_ns, dentry, cachefiles_xattr_cache, type, in cachefiles_check_object_type()
51 dentry, d_backing_inode(dentry)->i_ino, in cachefiles_check_object_type()
57 ret = vfs_getxattr(&init_user_ns, dentry, cachefiles_xattr_cache, xtype, in cachefiles_check_object_type()
64 dentry, d_backing_inode(dentry)->i_ino, in cachefiles_check_object_type()
84 d_backing_inode(dentry)->i_ino); in cachefiles_check_object_type()
91 dentry, d_backing_inode(dentry)->i_ino, in cachefiles_check_object_type()
103 struct dentry *dentry = object->dentry; in cachefiles_set_object_xattr() local
[all …]
/fs/nfs/
Ddir.c517 .dentry = file_dentry(desc->file), in nfs_readdir_xdr_filler()
570 int nfs_same_file(struct dentry *dentry, struct nfs_entry *entry) in nfs_same_file() argument
575 if (d_really_is_negative(dentry)) in nfs_same_file()
578 inode = d_inode(dentry); in nfs_same_file()
636 void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry, in nfs_prime_dcache()
641 struct dentry *dentry; in nfs_prime_dcache() local
642 struct dentry *alias; in nfs_prime_dcache()
666 dentry = d_lookup(parent, &filename); in nfs_prime_dcache()
668 if (!dentry) { in nfs_prime_dcache()
669 dentry = d_alloc_parallel(parent, &filename, &wq); in nfs_prime_dcache()
[all …]
Dunlink.c49 struct inode *dir = d_inode(data->dentry->d_parent); in nfs_async_unlink_done()
66 struct dentry *dentry = data->dentry; in nfs_async_unlink_release() local
67 struct super_block *sb = dentry->d_sb; in nfs_async_unlink_release()
69 up_read_non_owner(&NFS_I(d_inode(dentry->d_parent))->rmdir_sem); in nfs_async_unlink_release()
70 d_lookup_done(dentry); in nfs_async_unlink_release()
72 dput(dentry); in nfs_async_unlink_release()
79 struct inode *dir = d_inode(data->dentry->d_parent); in nfs_unlink_prepare()
104 struct inode *dir = d_inode(data->dentry->d_parent); in nfs_do_call_unlink()
113 NFS_PROTO(dir)->unlink_setup(&msg, data->dentry, inode); in nfs_do_call_unlink()
121 static int nfs_call_unlink(struct dentry *dentry, struct inode *inode, struct nfs_unlinkdata *data) in nfs_call_unlink() argument
[all …]
/fs/affs/
Dnamei.c46 __affs_hash_dentry(const struct dentry *dentry, struct qstr *qstr, toupper_t toupper, bool notrunca… in __affs_hash_dentry() argument
57 hash = init_name_hash(dentry); in __affs_hash_dentry()
67 affs_hash_dentry(const struct dentry *dentry, struct qstr *qstr) in affs_hash_dentry() argument
69 return __affs_hash_dentry(dentry, qstr, affs_toupper, in affs_hash_dentry()
70 affs_nofilenametruncate(dentry)); in affs_hash_dentry()
75 affs_intl_hash_dentry(const struct dentry *dentry, struct qstr *qstr) in affs_intl_hash_dentry() argument
77 return __affs_hash_dentry(dentry, qstr, affs_intl_toupper, in affs_intl_hash_dentry()
78 affs_nofilenametruncate(dentry)); in affs_intl_hash_dentry()
116 affs_compare_dentry(const struct dentry *dentry, in affs_compare_dentry() argument
121 affs_nofilenametruncate(dentry)); in affs_compare_dentry()
[all …]

12345678910>>...22