Home
last modified time | relevance | path

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

12345678910>>...21

/fs/
Ddcache.c107 static inline struct hlist_bl_head *d_hash(const struct dentry *parent, in d_hash()
203 struct dentry *dentry = container_of(head, struct dentry, d_u.d_rcu); in __d_free() local
205 WARN_ON(!list_empty(&dentry->d_alias)); in __d_free()
206 if (dname_external(dentry)) in __d_free()
207 kfree(dentry->d_name.name); in __d_free()
208 kmem_cache_free(dentry_cache, dentry); in __d_free()
214 static void d_free(struct dentry *dentry) in d_free() argument
216 BUG_ON(dentry->d_count); in d_free()
218 if (dentry->d_op && dentry->d_op->d_release) in d_free()
219 dentry->d_op->d_release(dentry); in d_free()
[all …]
Dnamei.c383 dget(path->dentry); in path_get()
395 dput(path->dentry); in path_put()
421 static int unlazy_walk(struct nameidata *nd, struct dentry *dentry) in unlazy_walk() argument
424 struct dentry *parent = nd->path.dentry; in unlazy_walk()
432 nd->root.dentry != fs->root.dentry) in unlazy_walk()
436 if (!dentry) { in unlazy_walk()
441 if (dentry->d_parent != parent) in unlazy_walk()
443 spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED); in unlazy_walk()
444 if (!__d_rcu_to_refcount(dentry, nd->seq)) in unlazy_walk()
452 BUG_ON(!IS_ROOT(dentry) && dentry->d_parent != parent); in unlazy_walk()
[all …]
Dxattr.c91 int __vfs_setxattr_noperm(struct dentry *dentry, const char *name, in __vfs_setxattr_noperm() argument
94 struct inode *inode = dentry->d_inode; in __vfs_setxattr_noperm()
102 error = inode->i_op->setxattr(dentry, name, value, size, flags); in __vfs_setxattr_noperm()
104 fsnotify_xattr(dentry); in __vfs_setxattr_noperm()
105 security_inode_post_setxattr(dentry, name, value, in __vfs_setxattr_noperm()
113 fsnotify_xattr(dentry); in __vfs_setxattr_noperm()
121 vfs_setxattr(struct dentry *dentry, const char *name, const void *value, in vfs_setxattr() argument
124 struct inode *inode = dentry->d_inode; in vfs_setxattr()
132 error = security_inode_setxattr(dentry, name, value, size, flags); in vfs_setxattr()
136 error = __vfs_setxattr_noperm(dentry, name, value, size, flags); in vfs_setxattr()
[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 *, struct nameidata *);
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 …]
Dautofs_i.h61 struct dentry *dentry; member
132 static inline struct autofs_info *autofs4_dentry_ino(struct dentry *dentry) in autofs4_dentry_ino() argument
134 return (struct autofs_info *)(dentry->d_fsdata); in autofs4_dentry_ino()
146 static inline int autofs4_ispending(struct dentry *dentry) in autofs4_ispending() argument
148 struct autofs_info *inf = autofs4_dentry_ino(dentry); in autofs4_ispending()
163 int is_autofs4_dentry(struct dentry *);
164 int autofs4_expire_wait(struct dentry *dentry);
172 struct dentry *autofs4_expire_direct(struct super_block *sb,
175 struct dentry *autofs4_expire_indirect(struct super_block *sb,
194 static inline void __managed_dentry_set_automount(struct dentry *dentry) in __managed_dentry_set_automount() argument
[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()
44 static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry) in autofs4_mount_busy() argument
46 struct dentry *top = dentry; in autofs4_mount_busy()
47 struct path path = {.mnt = mnt, .dentry = dentry}; in autofs4_mount_busy()
51 dentry, (int)dentry->d_name.len, dentry->d_name.name); in autofs4_mount_busy()
58 if (is_autofs4_dentry(path.dentry)) { in autofs4_mount_busy()
59 struct autofs_sb_info *sbi = autofs4_sbi(path.dentry->d_sb); in autofs4_mount_busy()
83 static struct dentry *get_next_positive_subdir(struct dentry *prev, in get_next_positive_subdir()
84 struct dentry *root) in get_next_positive_subdir()
[all …]
/fs/ceph/
Ddir.c36 int ceph_init_dentry(struct dentry *dentry) in ceph_init_dentry() argument
40 if (dentry->d_fsdata) in ceph_init_dentry()
47 spin_lock(&dentry->d_lock); in ceph_init_dentry()
48 if (dentry->d_fsdata) { in ceph_init_dentry()
54 if (dentry->d_parent == NULL || /* nfs fh_to_dentry */ in ceph_init_dentry()
55 ceph_snap(dentry->d_parent->d_inode) == CEPH_NOSNAP) in ceph_init_dentry()
56 d_set_d_op(dentry, &ceph_dentry_ops); in ceph_init_dentry()
57 else if (ceph_snap(dentry->d_parent->d_inode) == CEPH_SNAPDIR) in ceph_init_dentry()
58 d_set_d_op(dentry, &ceph_snapdir_dentry_ops); in ceph_init_dentry()
60 d_set_d_op(dentry, &ceph_snap_dentry_ops); in ceph_init_dentry()
[all …]
Dexport.c43 static int ceph_encode_fh(struct dentry *dentry, u32 *rawfh, int *max_len, in ceph_encode_fh() argument
49 struct dentry *parent; in ceph_encode_fh()
50 struct inode *inode = dentry->d_inode; in ceph_encode_fh()
58 spin_lock(&dentry->d_lock); in ceph_encode_fh()
59 parent = dentry->d_parent; in ceph_encode_fh()
61 dout("encode_fh %p connectable\n", dentry); in ceph_encode_fh()
62 cfh->ino = ceph_ino(dentry->d_inode); in ceph_encode_fh()
65 dentry); in ceph_encode_fh()
73 dout("encode_fh %p\n", dentry); in ceph_encode_fh()
74 fh->ino = ceph_ino(dentry->d_inode); in ceph_encode_fh()
[all …]
/fs/ocfs2/
Ddcache.c43 void ocfs2_dentry_attach_gen(struct dentry *dentry) in ocfs2_dentry_attach_gen() argument
46 OCFS2_I(dentry->d_parent->d_inode)->ip_dir_lock_gen; in ocfs2_dentry_attach_gen()
47 BUG_ON(dentry->d_inode); in ocfs2_dentry_attach_gen()
48 dentry->d_fsdata = (void *)gen; in ocfs2_dentry_attach_gen()
52 static int ocfs2_dentry_revalidate(struct dentry *dentry, in ocfs2_dentry_revalidate() argument
62 inode = dentry->d_inode; in ocfs2_dentry_revalidate()
63 osb = OCFS2_SB(dentry->d_sb); in ocfs2_dentry_revalidate()
65 trace_ocfs2_dentry_revalidate(dentry, dentry->d_name.len, in ocfs2_dentry_revalidate()
66 dentry->d_name.name); in ocfs2_dentry_revalidate()
73 unsigned long gen = (unsigned long) dentry->d_fsdata; in ocfs2_dentry_revalidate()
[all …]
/fs/debugfs/
Dinode.c75 static int debugfs_mknod(struct inode *dir, struct dentry *dentry, in debugfs_mknod() argument
82 if (dentry->d_inode) in debugfs_mknod()
87 d_instantiate(dentry, inode); in debugfs_mknod()
88 dget(dentry); in debugfs_mknod()
94 static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode, in debugfs_mkdir() argument
100 res = debugfs_mknod(dir, dentry, mode, 0, data, fops); in debugfs_mkdir()
103 fsnotify_mkdir(dir, dentry); in debugfs_mkdir()
108 static int debugfs_link(struct inode *dir, struct dentry *dentry, umode_t mode, in debugfs_link() argument
112 return debugfs_mknod(dir, dentry, mode, 0, data, fops); in debugfs_link()
115 static int debugfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, in debugfs_create() argument
[all …]
/fs/reiserfs/
Dxattr.c62 static int xattr_create(struct inode *dir, struct dentry *dentry, int mode) in xattr_create() argument
65 return dir->i_op->create(dir, dentry, mode, NULL); in xattr_create()
69 static int xattr_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) in xattr_mkdir() argument
72 return dir->i_op->mkdir(dir, dentry, mode); in xattr_mkdir()
79 static int xattr_unlink(struct inode *dir, struct dentry *dentry) in xattr_unlink() argument
84 reiserfs_mutex_lock_nested_safe(&dentry->d_inode->i_mutex, in xattr_unlink()
86 error = dir->i_op->unlink(dir, dentry); in xattr_unlink()
87 mutex_unlock(&dentry->d_inode->i_mutex); in xattr_unlink()
90 d_delete(dentry); in xattr_unlink()
94 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()
134 static int ecryptfs_interpose(struct dentry *lower_dentry, in ecryptfs_interpose()
135 struct dentry *dentry, struct super_block *sb) in ecryptfs_interpose() argument
141 d_instantiate(dentry, inode); in ecryptfs_interpose()
146 static int ecryptfs_do_unlink(struct inode *dir, struct dentry *dentry, in ecryptfs_do_unlink() argument
149 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_do_unlink()
151 struct dentry *lower_dir_dentry; in ecryptfs_do_unlink()
[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(dentry->d_inode); in cachefiles_check_object_type()
46 ret = vfs_setxattr(dentry, cachefiles_xattr_cache, type, 2, in cachefiles_check_object_type()
55 dentry->d_name.len, dentry->d_name.len, in cachefiles_check_object_type()
56 dentry->d_name.name, dentry->d_inode->i_ino, in cachefiles_check_object_type()
62 ret = vfs_getxattr(dentry, cachefiles_xattr_cache, xtype, 3); in cachefiles_check_object_type()
68 dentry->d_name.len, dentry->d_name.len, in cachefiles_check_object_type()
69 dentry->d_name.name, dentry->d_inode->i_ino, in cachefiles_check_object_type()
89 dentry->d_inode->i_ino); in cachefiles_check_object_type()
[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, struct nameidata *nd);
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/ncpfs/
Ddir.c33 static int ncp_create(struct inode *, struct dentry *, umode_t, struct nameidata *);
34 static struct dentry *ncp_lookup(struct inode *, struct dentry *, struct nameidata *);
35 static int ncp_unlink(struct inode *, struct dentry *);
36 static int ncp_mkdir(struct inode *, struct dentry *, umode_t);
37 static int ncp_rmdir(struct inode *, struct dentry *);
38 static int ncp_rename(struct inode *, struct dentry *,
39 struct inode *, struct dentry *);
40 static int ncp_mknod(struct inode * dir, struct dentry *dentry,
43 extern int ncp_symlink(struct inode *, struct dentry *, const char *);
75 static int ncp_lookup_validate(struct dentry *, struct nameidata *);
[all …]
/fs/affs/
Dnamei.c16 static int affs_hash_dentry(const struct dentry *,
18 static int affs_compare_dentry(const struct dentry *parent,
20 const struct dentry *dentry, const struct inode *inode,
23 static int affs_intl_hash_dentry(const struct dentry *,
25 static int affs_intl_compare_dentry(const struct dentry *parent,
27 const struct dentry *dentry, const struct inode *inode,
89 affs_hash_dentry(const struct dentry *dentry, const struct inode *inode, in affs_hash_dentry() argument
95 affs_intl_hash_dentry(const struct dentry *dentry, const struct inode *inode, in affs_intl_hash_dentry() argument
134 affs_compare_dentry(const struct dentry *parent, const struct inode *pinode, in affs_compare_dentry()
135 const struct dentry *dentry, const struct inode *inode, in affs_compare_dentry() argument
[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()
59 BUG_ON(sd->s_dentry != dentry); in configfs_d_iput()
73 static int configfs_d_delete(const struct dentry *dentry) in configfs_d_delete() argument
227 struct dentry * dentry, void * element, in configfs_make_dirent() argument
237 sd->s_dentry = dentry; in configfs_make_dirent()
238 if (dentry) in configfs_make_dirent()
239 dentry->d_fsdata = configfs_get(sd); in configfs_make_dirent()
267 static int create_dir(struct config_item *k, struct dentry *d) in create_dir()
271 struct dentry *p = d->d_parent; in create_dir()
[all …]
Dconfigfs_internal.h40 struct dentry * s_dentry;
66 extern int configfs_create(struct dentry *, umode_t mode, int (*init)(struct inode *));
72 struct dentry *, void *, umode_t, int);
75 extern int configfs_add_file(struct dentry *, const struct configfs_attribute *, int);
76 extern void configfs_hash_and_remove(struct dentry * dir, const char * name);
79 extern void configfs_drop_dentry(struct configfs_dirent *sd, struct dentry *parent);
80 extern int configfs_setattr(struct dentry *dentry, struct iattr *iattr);
82 extern struct dentry *configfs_pin_fs(void);
94 extern int configfs_symlink(struct inode *dir, struct dentry *dentry,
96 extern int configfs_unlink(struct inode *dir, struct dentry *dentry);
[all …]
/fs/nfs/
Ddir.c49 static struct dentry *nfs_lookup(struct inode *, struct dentry *, struct nameidata *);
50 static int nfs_create(struct inode *, struct dentry *, umode_t, struct nameidata *);
51 static int nfs_mkdir(struct inode *, struct dentry *, umode_t);
52 static int nfs_rmdir(struct inode *, struct dentry *);
53 static int nfs_unlink(struct inode *, struct dentry *);
54 static int nfs_symlink(struct inode *, struct dentry *, const char *);
55 static int nfs_link(struct dentry *, struct inode *, struct dentry *);
56 static int nfs_mknod(struct inode *, struct dentry *, umode_t, dev_t);
57 static int nfs_rename(struct inode *, struct dentry *,
58 struct inode *, struct dentry *);
[all …]
Dunlink.c42 static int nfs_copy_dname(struct dentry *dentry, struct nfs_unlinkdata *data) in nfs_copy_dname() argument
45 int len = dentry->d_name.len; in nfs_copy_dname()
47 str = kmemdup(dentry->d_name.name, NAME_ALLOC_LEN(len), GFP_KERNEL); in nfs_copy_dname()
113 static int nfs_do_call_unlink(struct dentry *parent, struct inode *dir, struct nfs_unlinkdata *data) in nfs_do_call_unlink()
128 struct dentry *alias; in nfs_do_call_unlink()
179 static int nfs_call_unlink(struct dentry *dentry, struct nfs_unlinkdata *data) in nfs_call_unlink() argument
181 struct dentry *parent; in nfs_call_unlink()
186 parent = dget_parent(dentry); in nfs_call_unlink()
207 void nfs_block_sillyrename(struct dentry *dentry) in nfs_block_sillyrename() argument
209 struct nfs_inode *nfsi = NFS_I(dentry->d_inode); in nfs_block_sillyrename()
[all …]
/fs/nfsd/
Dnfsfh.c26 static int nfsd_acceptable(void *expv, struct dentry *dentry) in nfsd_acceptable() argument
30 struct dentry *tdentry; in nfsd_acceptable()
31 struct dentry *parent; in nfsd_acceptable()
36 tdentry = dget(dentry); in nfsd_acceptable()
37 while (tdentry != exp->ex_path.dentry && !IS_ROOT(tdentry)) { in nfsd_acceptable()
49 if (tdentry != exp->ex_path.dentry) in nfsd_acceptable()
51 rv = (tdentry == exp->ex_path.dentry); in nfsd_acceptable()
102 struct dentry *dentry, struct svc_export *exp) in check_pseudo_root() argument
118 if (unlikely(!S_ISDIR(dentry->d_inode->i_mode) && in check_pseudo_root()
119 !S_ISLNK(dentry->d_inode->i_mode))) in check_pseudo_root()
[all …]
/fs/9p/
Dfid.c44 int v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid) in v9fs_fid_add() argument
49 fid->fid, dentry->d_name.name); in v9fs_fid_add()
51 dent = dentry->d_fsdata; in v9fs_fid_add()
59 dentry->d_fsdata = dent; in v9fs_fid_add()
77 static struct p9_fid *v9fs_fid_find(struct dentry *dentry, u32 uid, int any) in v9fs_fid_find() argument
83 dentry->d_name.name, dentry, uid, any); in v9fs_fid_find()
84 dent = (struct v9fs_dentry *) dentry->d_fsdata; in v9fs_fid_find()
106 struct dentry *dentry, char ***names) in build_path_from_dentry() argument
110 struct dentry *ds; in build_path_from_dentry()
112 for (ds = dentry; !IS_ROOT(ds); ds = ds->d_parent) in build_path_from_dentry()
[all …]
/fs/exportfs/
Dexpfs.c22 static int get_name(struct vfsmount *mnt, struct dentry *dentry, char *name,
23 struct dentry *child);
26 static int exportfs_get_name(struct vfsmount *mnt, struct dentry *dir, in exportfs_get_name()
27 char *name, struct dentry *child) 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 list_for_each_entry(dentry, &inode->i_dentry, d_alias) { in find_acceptable_alias()
54 dget(dentry); in find_acceptable_alias()
[all …]
/fs/proc/
Dnamespaces.c38 static int ns_delete_dentry(const struct dentry *dentry) in ns_delete_dentry() argument
44 static char *ns_dname(struct dentry *dentry, char *buffer, int buflen) in ns_dname() argument
46 struct inode *inode = dentry->d_inode; in ns_dname()
49 return dynamic_dname(dentry, buffer, buflen, "%s:[%lu]", in ns_dname()
59 static struct dentry *proc_ns_get_dentry(struct super_block *sb, in proc_ns_get_dentry()
62 struct dentry *dentry, *result; in proc_ns_get_dentry() local
72 dentry = d_alloc_pseudo(sb, &qname); in proc_ns_get_dentry()
73 if (!dentry) { in proc_ns_get_dentry()
80 dput(dentry); in proc_ns_get_dentry()
98 d_set_d_op(dentry, &ns_dentry_operations); in proc_ns_get_dentry()
[all …]
/fs/sysv/
Dnamei.c18 static int add_nondir(struct dentry *dentry, struct inode *inode) in add_nondir() argument
20 int err = sysv_add_link(dentry, inode); in add_nondir()
22 d_instantiate(dentry, inode); in add_nondir()
30 static int sysv_hash(const struct dentry *dentry, const struct inode *inode, in sysv_hash() argument
46 static struct dentry *sysv_lookup(struct inode * dir, struct dentry * dentry, struct nameidata *nd) in sysv_lookup() argument
51 if (dentry->d_name.len > SYSV_NAMELEN) in sysv_lookup()
53 ino = sysv_inode_by_name(dentry); in sysv_lookup()
60 d_add(dentry, inode); in sysv_lookup()
64 static int sysv_mknod(struct inode * dir, struct dentry * dentry, umode_t mode, dev_t rdev) in sysv_mknod() argument
78 err = add_nondir(dentry, inode); in sysv_mknod()
[all …]

12345678910>>...21