Home
last modified time | relevance | path

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

12345678910>>...20

/fs/
Ddcache.c107 static inline struct hlist_bl_head *d_hash(const struct dentry *parent, in d_hash()
216 static inline int dentry_cmp(const struct dentry *dentry, const unsigned char *ct, unsigned tcount) in dentry_cmp() argument
235 cs = ACCESS_ONCE(dentry->d_name.name); in dentry_cmp()
248 static inline struct external_name *external_name(struct dentry *dentry) in external_name() argument
250 return container_of(dentry->d_name.name, struct external_name, name[0]); in external_name()
255 struct dentry *dentry = container_of(head, struct dentry, d_u.d_rcu); in __d_free() local
257 kmem_cache_free(dentry_cache, dentry); in __d_free()
262 struct dentry *dentry = container_of(head, struct dentry, d_u.d_rcu); in __d_free_external() local
263 kfree(external_name(dentry)); in __d_free_external()
264 kmem_cache_free(dentry_cache, dentry); in __d_free_external()
[all …]
Dnamei.c494 dget(path->dentry); in path_get()
506 dput(path->dentry); in path_put()
595 return is_subdir(path->dentry, mnt->mnt_root); in path_connected()
649 path->dentry = NULL; in legitimize_path()
652 if (unlikely(!lockref_get_not_dead(&path->dentry->d_lockref))) { in legitimize_path()
653 path->dentry = NULL; in legitimize_path()
656 return !read_seqcount_retry(&path->dentry->d_seq, seq); in legitimize_path()
697 static int unlazy_walk(struct nameidata *nd, struct dentry *dentry, unsigned seq) in unlazy_walk() argument
699 struct dentry *parent = nd->path.dentry; in unlazy_walk()
722 if (!dentry) { in unlazy_walk()
[all …]
Dbad_inode.c28 static int bad_inode_create (struct inode *dir, struct dentry *dentry, in bad_inode_create() argument
34 static struct dentry *bad_inode_lookup(struct inode *dir, in bad_inode_lookup()
35 struct dentry *dentry, unsigned int flags) in bad_inode_lookup() argument
40 static int bad_inode_link (struct dentry *old_dentry, struct inode *dir, in bad_inode_link()
41 struct dentry *dentry) in bad_inode_link() argument
46 static int bad_inode_unlink(struct inode *dir, struct dentry *dentry) in bad_inode_unlink() argument
51 static int bad_inode_symlink (struct inode *dir, struct dentry *dentry, in bad_inode_symlink() argument
57 static int bad_inode_mkdir(struct inode *dir, struct dentry *dentry, in bad_inode_mkdir() argument
63 static int bad_inode_rmdir (struct inode *dir, struct dentry *dentry) in bad_inode_rmdir() argument
68 static int bad_inode_mknod (struct inode *dir, struct dentry *dentry, in bad_inode_mknod() argument
[all …]
/fs/overlayfs/
Doverlayfs.h30 static inline int ovl_do_rmdir(struct inode *dir, struct dentry *dentry) in ovl_do_rmdir() argument
32 int err = vfs_rmdir(dir, dentry); in ovl_do_rmdir()
33 pr_debug("rmdir(%pd2) = %i\n", dentry, err); in ovl_do_rmdir()
37 static inline int ovl_do_unlink(struct inode *dir, struct dentry *dentry) in ovl_do_unlink() argument
39 int err = vfs_unlink(dir, dentry, NULL); in ovl_do_unlink()
40 pr_debug("unlink(%pd2) = %i\n", dentry, err); in ovl_do_unlink()
44 static inline int ovl_do_link(struct dentry *old_dentry, struct inode *dir, in ovl_do_link()
45 struct dentry *new_dentry, bool debug) in ovl_do_link()
55 static inline int ovl_do_create(struct inode *dir, struct dentry *dentry, in ovl_do_create() argument
58 int err = vfs_create(dir, dentry, mode, true); in ovl_do_create()
[all …]
Ddir.c18 void ovl_cleanup(struct inode *wdir, struct dentry *wdentry) in ovl_cleanup()
35 struct dentry *ovl_lookup_temp(struct dentry *workdir, struct dentry *dentry) in ovl_lookup_temp() argument
37 struct dentry *temp; in ovl_lookup_temp()
55 static struct dentry *ovl_whiteout(struct dentry *workdir, in ovl_whiteout()
56 struct dentry *dentry) in ovl_whiteout() argument
59 struct dentry *whiteout; in ovl_whiteout()
62 whiteout = ovl_lookup_temp(workdir, dentry); in ovl_whiteout()
75 int ovl_create_real(struct inode *dir, struct dentry *newdentry, in ovl_create_real()
77 struct dentry *hardlink, bool debug) in ovl_create_real()
122 static int ovl_set_opaque(struct dentry *upperdentry) in ovl_set_opaque()
[all …]
Dsuper.c41 struct dentry *workdir;
53 struct dentry *__upperdentry;
68 static struct dentry *__ovl_dentry_lower(struct ovl_entry *oe) in __ovl_dentry_lower()
70 return oe->numlower ? oe->lowerstack[0].dentry : NULL; in __ovl_dentry_lower()
73 enum ovl_path_type ovl_path_type(struct dentry *dentry) in ovl_path_type() argument
75 struct ovl_entry *oe = dentry->d_fsdata; in ovl_path_type()
85 if (oe->numlower && S_ISDIR(dentry->d_inode->i_mode)) in ovl_path_type()
96 static struct dentry *ovl_upperdentry_dereference(struct ovl_entry *oe) in ovl_upperdentry_dereference()
101 void ovl_path_upper(struct dentry *dentry, struct path *path) in ovl_path_upper() argument
103 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_path_upper()
[all …]
Dinode.c15 static int ovl_copy_up_truncate(struct dentry *dentry) in ovl_copy_up_truncate() argument
18 struct dentry *parent; in ovl_copy_up_truncate()
22 parent = dget_parent(dentry); in ovl_copy_up_truncate()
27 ovl_path_lower(dentry, &lowerpath); in ovl_copy_up_truncate()
33 err = ovl_copy_up_one(parent, dentry, &lowerpath, &stat); in ovl_copy_up_truncate()
40 int ovl_setattr(struct dentry *dentry, struct iattr *attr) in ovl_setattr() argument
43 struct dentry *upperdentry; in ovl_setattr()
54 err = inode_change_ok(dentry->d_inode, attr); in ovl_setattr()
58 err = ovl_want_write(dentry); in ovl_setattr()
62 err = ovl_copy_up(dentry); in ovl_setattr()
[all …]
/fs/autofs4/
Droot.c26 static int autofs4_dir_symlink(struct inode *,struct dentry *,const char *);
27 static int autofs4_dir_unlink(struct inode *,struct dentry *);
28 static int autofs4_dir_rmdir(struct inode *,struct dentry *);
29 static int autofs4_dir_mkdir(struct inode *,struct dentry *,umode_t);
35 static struct dentry *autofs4_lookup(struct inode *,struct dentry *, unsigned int);
37 static int autofs4_d_manage(struct dentry *, bool);
38 static void autofs4_dentry_release(struct dentry *);
74 static void autofs4_add_active(struct dentry *dentry) in autofs4_add_active() argument
76 struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); in autofs4_add_active()
77 struct autofs_info *ino = autofs4_dentry_ino(dentry); in autofs4_add_active()
[all …]
Dexpire.c20 static inline int autofs4_can_expire(struct dentry *dentry, in autofs4_can_expire() argument
23 struct autofs_info *ino = autofs4_dentry_ino(dentry); in autofs4_can_expire()
38 static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry) in autofs4_mount_busy() argument
40 struct dentry *top = dentry; in autofs4_mount_busy()
41 struct path path = {.mnt = mnt, .dentry = dentry}; in autofs4_mount_busy()
44 DPRINTK("dentry %p %pd", dentry, dentry); in autofs4_mount_busy()
51 if (is_autofs4_dentry(path.dentry)) { in autofs4_mount_busy()
52 struct autofs_sb_info *sbi = autofs4_sbi(path.dentry->d_sb); in autofs4_mount_busy()
76 static struct dentry *get_next_positive_subdir(struct dentry *prev, in get_next_positive_subdir()
77 struct dentry *root) in get_next_positive_subdir()
[all …]
/fs/tracefs/
Dinode.c58 static char *get_dname(struct dentry *dentry) in get_dname() argument
62 int len = dentry->d_name.len; in get_dname()
64 dname = dentry->d_name.name; in get_dname()
73 static int tracefs_syscall_mkdir(struct inode *inode, struct dentry *dentry, umode_t mode) in tracefs_syscall_mkdir() argument
78 name = get_dname(dentry); in tracefs_syscall_mkdir()
96 static int tracefs_syscall_rmdir(struct inode *inode, struct dentry *dentry) in tracefs_syscall_rmdir() argument
101 name = get_dname(dentry); in tracefs_syscall_rmdir()
113 mutex_unlock(&dentry->d_inode->i_mutex); in tracefs_syscall_rmdir()
118 mutex_lock(&dentry->d_inode->i_mutex); in tracefs_syscall_rmdir()
165 static void change_gid(struct dentry *dentry, kgid_t gid) in change_gid() argument
[all …]
/fs/debugfs/
Dinode.c150 static int debugfs_show_options(struct seq_file *m, struct dentry *root) in debugfs_show_options()
190 f = (struct vfsmount *(*)(void *))path->dentry->d_fsdata; in debugfs_automount()
191 return f(d_inode(path->dentry)->i_private); in debugfs_automount()
235 static struct dentry *debug_mount(struct file_system_type *fs_type, in debug_mount()
250 static struct dentry *start_creating(const char *name, struct dentry *parent) in start_creating()
252 struct dentry *dentry; in start_creating() local
274 dentry = lookup_one_len(name, parent, strlen(name)); in start_creating()
275 if (!IS_ERR(dentry) && d_really_is_positive(dentry)) { in start_creating()
276 dput(dentry); in start_creating()
277 dentry = ERR_PTR(-EEXIST); in start_creating()
[all …]
/fs/ocfs2/
Ddcache.c42 void ocfs2_dentry_attach_gen(struct dentry *dentry) in ocfs2_dentry_attach_gen() argument
45 OCFS2_I(d_inode(dentry->d_parent))->ip_dir_lock_gen; in ocfs2_dentry_attach_gen()
46 BUG_ON(d_inode(dentry)); in ocfs2_dentry_attach_gen()
47 dentry->d_fsdata = (void *)gen; in ocfs2_dentry_attach_gen()
51 static int ocfs2_dentry_revalidate(struct dentry *dentry, unsigned int flags) in ocfs2_dentry_revalidate() argument
60 inode = d_inode(dentry); in ocfs2_dentry_revalidate()
61 osb = OCFS2_SB(dentry->d_sb); in ocfs2_dentry_revalidate()
63 trace_ocfs2_dentry_revalidate(dentry, dentry->d_name.len, in ocfs2_dentry_revalidate()
64 dentry->d_name.name); in ocfs2_dentry_revalidate()
71 unsigned long gen = (unsigned long) dentry->d_fsdata; in ocfs2_dentry_revalidate()
[all …]
/fs/exportfs/
Dexpfs.c22 static int get_name(const struct path *path, char *name, struct dentry *child);
25 static int exportfs_get_name(struct vfsmount *mnt, struct dentry *dir, in exportfs_get_name()
26 char *name, struct dentry *child) in exportfs_get_name()
29 struct path path = {.mnt = mnt, .dentry = dir}; in exportfs_get_name()
40 static struct dentry *
41 find_acceptable_alias(struct dentry *result, in find_acceptable_alias()
42 int (*acceptable)(void *context, struct dentry *dentry), in find_acceptable_alias() argument
45 struct dentry *dentry, *toput = NULL; in find_acceptable_alias() local
53 hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) { in find_acceptable_alias()
54 dget(dentry); in find_acceptable_alias()
[all …]
/fs/ceph/
Ddir.c34 int ceph_init_dentry(struct dentry *dentry) in ceph_init_dentry() argument
38 if (dentry->d_fsdata) in ceph_init_dentry()
45 spin_lock(&dentry->d_lock); in ceph_init_dentry()
46 if (dentry->d_fsdata) { in ceph_init_dentry()
52 if (ceph_snap(d_inode(dentry->d_parent)) == CEPH_NOSNAP) in ceph_init_dentry()
53 d_set_d_op(dentry, &ceph_dentry_ops); in ceph_init_dentry()
54 else if (ceph_snap(d_inode(dentry->d_parent)) == CEPH_SNAPDIR) in ceph_init_dentry()
55 d_set_d_op(dentry, &ceph_snapdir_dentry_ops); in ceph_init_dentry()
57 d_set_d_op(dentry, &ceph_snap_dentry_ops); in ceph_init_dentry()
59 di->dentry = dentry; in ceph_init_dentry()
[all …]
/fs/9p/
Dfid.c44 static inline void __add_fid(struct dentry *dentry, struct p9_fid *fid) in __add_fid() argument
46 hlist_add_head(&fid->dlist, (struct hlist_head *)&dentry->d_fsdata); in __add_fid()
49 void v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid) in v9fs_fid_add() argument
51 spin_lock(&dentry->d_lock); in v9fs_fid_add()
52 __add_fid(dentry, fid); in v9fs_fid_add()
53 spin_unlock(&dentry->d_lock); in v9fs_fid_add()
64 static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any) in v9fs_fid_find() argument
69 dentry, dentry, from_kuid(&init_user_ns, uid), in v9fs_fid_find()
73 if (dentry->d_fsdata) { in v9fs_fid_find()
74 struct hlist_head *h = (struct hlist_head *)&dentry->d_fsdata; in v9fs_fid_find()
[all …]
/fs/reiserfs/
Dxattr.c65 static int xattr_create(struct inode *dir, struct dentry *dentry, int mode) in xattr_create() argument
68 return dir->i_op->create(dir, dentry, mode, true); in xattr_create()
72 static int xattr_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) in xattr_mkdir() argument
75 return dir->i_op->mkdir(dir, dentry, mode); in xattr_mkdir()
84 static int xattr_unlink(struct inode *dir, struct dentry *dentry) in xattr_unlink() argument
90 mutex_lock_nested(&d_inode(dentry)->i_mutex, I_MUTEX_CHILD); in xattr_unlink()
91 error = dir->i_op->unlink(dir, dentry); in xattr_unlink()
92 mutex_unlock(&d_inode(dentry)->i_mutex); in xattr_unlink()
95 d_delete(dentry); in xattr_unlink()
99 static int xattr_rmdir(struct inode *dir, struct dentry *dentry) in xattr_rmdir() argument
[all …]
/fs/ecryptfs/
Dinode.c39 static struct dentry *lock_parent(struct dentry *dentry) in lock_parent() argument
41 struct dentry *dir; in lock_parent()
43 dir = dget_parent(dentry); in lock_parent()
48 static void unlock_dir(struct dentry *dir) in unlock_dir()
131 static int ecryptfs_interpose(struct dentry *lower_dentry, in ecryptfs_interpose()
132 struct dentry *dentry, struct super_block *sb) in ecryptfs_interpose() argument
138 d_instantiate(dentry, inode); in ecryptfs_interpose()
143 static int ecryptfs_do_unlink(struct inode *dir, struct dentry *dentry, in ecryptfs_do_unlink() argument
146 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_do_unlink()
148 struct dentry *lower_dir_dentry; in ecryptfs_do_unlink()
[all …]
/fs/configfs/
Ddir.c53 static void configfs_d_iput(struct dentry * dentry, in configfs_d_iput() argument
56 struct configfs_dirent *sd = dentry->d_fsdata; in configfs_d_iput()
67 if (sd->s_dentry == dentry) in configfs_d_iput()
224 struct dentry * dentry, void * element, in configfs_make_dirent() argument
234 sd->s_dentry = dentry; in configfs_make_dirent()
235 if (dentry) in configfs_make_dirent()
236 dentry->d_fsdata = configfs_get(sd); in configfs_make_dirent()
270 static int configfs_create_dir(struct config_item *item, struct dentry *dentry) in configfs_create_dir() argument
274 struct dentry *p = dentry->d_parent; in configfs_create_dir()
278 error = configfs_dirent_exists(p->d_fsdata, dentry->d_name.name); in configfs_create_dir()
[all …]
/fs/sdcardfs/
Ddentry.c29 static int sdcardfs_d_revalidate(struct dentry *dentry, unsigned int flags) in sdcardfs_d_revalidate() argument
33 struct dentry *parent_dentry = NULL; in sdcardfs_d_revalidate()
34 struct dentry *parent_lower_dentry = NULL; in sdcardfs_d_revalidate()
35 struct dentry *lower_cur_parent_dentry = NULL; in sdcardfs_d_revalidate()
36 struct dentry *lower_dentry = NULL; in sdcardfs_d_revalidate()
43 spin_lock(&dentry->d_lock); in sdcardfs_d_revalidate()
44 if (IS_ROOT(dentry)) { in sdcardfs_d_revalidate()
45 spin_unlock(&dentry->d_lock); in sdcardfs_d_revalidate()
48 spin_unlock(&dentry->d_lock); in sdcardfs_d_revalidate()
53 if (is_obbpath_invalid(dentry)) { in sdcardfs_d_revalidate()
[all …]
Dlookup.c42 void free_dentry_private_data(struct dentry *dentry) in free_dentry_private_data() argument
44 kmem_cache_free(sdcardfs_dentry_cachep, dentry->d_fsdata); in free_dentry_private_data()
45 dentry->d_fsdata = NULL; in free_dentry_private_data()
49 int new_dentry_private_data(struct dentry *dentry) in new_dentry_private_data() argument
51 struct sdcardfs_dentry_info *info = SDCARDFS_D(dentry); in new_dentry_private_data()
59 dentry->d_fsdata = info; in new_dentry_private_data()
167 static struct dentry *__sdcardfs_interpose(struct dentry *dentry, in __sdcardfs_interpose() argument
175 struct dentry *ret_dentry; in __sdcardfs_interpose()
177 lower_inode = d_inode(lower_path->dentry); in __sdcardfs_interpose()
198 ret_dentry = d_splice_alias(inode, dentry); in __sdcardfs_interpose()
[all …]
/fs/afs/
Ddir.c22 static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry,
26 static int afs_d_revalidate(struct dentry *dentry, unsigned int flags);
27 static int afs_d_delete(const struct dentry *dentry);
28 static void afs_d_release(struct dentry *dentry);
31 static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
33 static int afs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode);
34 static int afs_rmdir(struct inode *dir, struct dentry *dentry);
35 static int afs_unlink(struct inode *dir, struct dentry *dentry);
36 static int afs_link(struct dentry *from, struct inode *dir,
37 struct dentry *dentry);
[all …]
/fs/nfs/
Dnamespace.c50 char *nfs_path(char **p, struct dentry *dentry_in, char *buffer, in nfs_path()
57 struct dentry *dentry; in nfs_path() local
62 dentry = dentry_in; in nfs_path()
70 spin_lock(&dentry->d_lock); in nfs_path()
71 if (IS_ROOT(dentry)) in nfs_path()
73 namelen = dentry->d_name.len; in nfs_path()
78 memcpy(end, dentry->d_name.name, namelen); in nfs_path()
80 spin_unlock(&dentry->d_lock); in nfs_path()
81 dentry = dentry->d_parent; in nfs_path()
84 spin_unlock(&dentry->d_lock); in nfs_path()
[all …]
Dunlink.c45 static int nfs_copy_dname(struct dentry *dentry, struct nfs_unlinkdata *data) in nfs_copy_dname() argument
48 int len = dentry->d_name.len; in nfs_copy_dname()
50 str = kmemdup(dentry->d_name.name, NAME_ALLOC_LEN(len), GFP_KERNEL); in nfs_copy_dname()
117 static int nfs_do_call_unlink(struct dentry *parent, struct inode *dir, struct nfs_unlinkdata *data) in nfs_do_call_unlink()
132 struct dentry *alias; in nfs_do_call_unlink()
183 static int nfs_call_unlink(struct dentry *dentry, struct nfs_unlinkdata *data) in nfs_call_unlink() argument
185 struct dentry *parent; in nfs_call_unlink()
190 parent = dget_parent(dentry); in nfs_call_unlink()
211 void nfs_wait_on_sillyrename(struct dentry *dentry) in nfs_wait_on_sillyrename() argument
213 struct nfs_inode *nfsi = NFS_I(d_inode(dentry)); in nfs_wait_on_sillyrename()
[all …]
/fs/cachefiles/
Dxattr.c31 struct dentry *dentry = object->dentry; in cachefiles_check_object_type() local
35 ASSERT(dentry); in cachefiles_check_object_type()
36 ASSERT(d_backing_inode(dentry)); in cachefiles_check_object_type()
46 ret = vfs_setxattr(dentry, cachefiles_xattr_cache, type, 2, in cachefiles_check_object_type()
55 dentry, d_backing_inode(dentry)->i_ino, in cachefiles_check_object_type()
61 ret = vfs_getxattr(dentry, cachefiles_xattr_cache, xtype, 3); in cachefiles_check_object_type()
67 dentry, d_backing_inode(dentry)->i_ino, in cachefiles_check_object_type()
87 d_backing_inode(dentry)->i_ino); in cachefiles_check_object_type()
94 dentry, d_backing_inode(dentry)->i_ino, in cachefiles_check_object_type()
106 struct dentry *dentry = object->dentry; in cachefiles_set_object_xattr() local
[all …]
/fs/affs/
Dnamei.c16 static int affs_hash_dentry(const struct dentry *, struct qstr *);
17 static int affs_compare_dentry(const struct dentry *parent, const struct dentry *dentry,
20 static int affs_intl_hash_dentry(const struct dentry *, struct qstr *);
21 static int affs_intl_compare_dentry(const struct dentry *parent, const struct dentry *dentry,
85 affs_hash_dentry(const struct dentry *dentry, struct qstr *qstr) in affs_hash_dentry() argument
88 affs_nofilenametruncate(dentry)); in affs_hash_dentry()
93 affs_intl_hash_dentry(const struct dentry *dentry, struct qstr *qstr) in affs_intl_hash_dentry() argument
96 affs_nofilenametruncate(dentry)); in affs_intl_hash_dentry()
134 affs_compare_dentry(const struct dentry *parent, const struct dentry *dentry, in affs_compare_dentry() argument
143 affs_intl_compare_dentry(const struct dentry *parent, const struct dentry *dentry, in affs_intl_compare_dentry() argument
[all …]

12345678910>>...20