Home
last modified time | relevance | path

Searched refs:dentry (Results 1 – 200 of 1213) sorted by relevance

1234567

/linux-4.4.14/include/linux/
Ddcache.h108 struct dentry { struct
113 struct dentry *d_parent; /* parent directory */ argument
151 int (*d_revalidate)(struct dentry *, unsigned int);
152 int (*d_weak_revalidate)(struct dentry *, unsigned int);
153 int (*d_hash)(const struct dentry *, struct qstr *);
154 int (*d_compare)(const struct dentry *, const struct dentry *,
156 int (*d_delete)(const struct dentry *);
157 void (*d_release)(struct dentry *);
158 void (*d_prune)(struct dentry *);
159 void (*d_iput)(struct dentry *, struct inode *);
[all …]
Ddebugfs.h42 extern struct dentry *arch_debugfs_dir;
49 struct dentry *debugfs_create_file(const char *name, umode_t mode,
50 struct dentry *parent, void *data,
53 struct dentry *debugfs_create_file_size(const char *name, umode_t mode,
54 struct dentry *parent, void *data,
58 struct dentry *debugfs_create_dir(const char *name, struct dentry *parent);
60 struct dentry *debugfs_create_symlink(const char *name, struct dentry *parent,
63 struct dentry *debugfs_create_automount(const char *name,
64 struct dentry *parent,
68 void debugfs_remove(struct dentry *dentry);
[all …]
Devm.h17 extern enum integrity_status evm_verifyxattr(struct dentry *dentry,
22 extern int evm_inode_setattr(struct dentry *dentry, struct iattr *attr);
23 extern void evm_inode_post_setattr(struct dentry *dentry, int ia_valid);
24 extern int evm_inode_setxattr(struct dentry *dentry, const char *name,
26 extern void evm_inode_post_setxattr(struct dentry *dentry,
30 extern int evm_inode_removexattr(struct dentry *dentry, const char *xattr_name);
31 extern void evm_inode_post_removexattr(struct dentry *dentry,
46 static inline enum integrity_status evm_verifyxattr(struct dentry *dentry, in evm_verifyxattr() argument
56 static inline int evm_inode_setattr(struct dentry *dentry, struct iattr *attr) in evm_inode_setattr() argument
61 static inline void evm_inode_post_setattr(struct dentry *dentry, int ia_valid) in evm_inode_post_setattr() argument
[all …]
Dsecurity.h42 struct dentry;
82 extern int cap_inode_setxattr(struct dentry *dentry, const char *name,
84 extern int cap_inode_removexattr(struct dentry *dentry, const char *name);
85 extern int cap_inode_need_killpriv(struct dentry *dentry);
86 extern int cap_inode_killpriv(struct dentry *dentry);
207 int security_quota_on(struct dentry *dentry);
222 int security_sb_statfs(struct dentry *dentry);
234 int security_dentry_init_security(struct dentry *dentry, int mode,
246 int security_inode_create(struct inode *dir, struct dentry *dentry, umode_t mode);
247 int security_inode_link(struct dentry *old_dentry, struct inode *dir,
[all …]
Dxattr.h20 struct dentry;
25 size_t (*list)(const struct xattr_handler *, struct dentry *dentry,
28 int (*get)(const struct xattr_handler *, struct dentry *dentry,
30 int (*set)(const struct xattr_handler *, struct dentry *dentry,
44 ssize_t vfs_getxattr(struct dentry *, const char *, void *, size_t);
45 ssize_t vfs_listxattr(struct dentry *d, char *list, size_t size);
46 int __vfs_setxattr_noperm(struct dentry *, const char *, const void *, size_t, int);
47 int vfs_setxattr(struct dentry *, const char *, const void *, size_t, int);
48 int vfs_removexattr(struct dentry *, const char *);
50 ssize_t generic_getxattr(struct dentry *dentry, const char *name, void *buffer, size_t size);
[all …]
Dfsnotify.h22 static inline void fsnotify_d_instantiate(struct dentry *dentry, in fsnotify_d_instantiate() argument
25 __fsnotify_d_instantiate(dentry, inode); in fsnotify_d_instantiate()
29 static inline int fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask) in fsnotify_parent() argument
31 if (!dentry) in fsnotify_parent()
32 dentry = path->dentry; in fsnotify_parent()
34 return __fsnotify_parent(path, dentry, mask); in fsnotify_parent()
66 static inline void fsnotify_d_move(struct dentry *dentry) in fsnotify_d_move() argument
72 __fsnotify_update_dcache_flags(dentry); in fsnotify_d_move()
88 int isdir, struct inode *target, struct dentry *moved) in fsnotify_move()
136 static inline void fsnotify_nameremove(struct dentry *dentry, int isdir) in fsnotify_nameremove() argument
[all …]
Dima.h58 extern void ima_inode_post_setattr(struct dentry *dentry);
59 extern int ima_inode_setxattr(struct dentry *dentry, const char *xattr_name,
61 extern int ima_inode_removexattr(struct dentry *dentry, const char *xattr_name);
63 static inline void ima_inode_post_setattr(struct dentry *dentry) in ima_inode_post_setattr() argument
68 static inline int ima_inode_setxattr(struct dentry *dentry, in ima_inode_setxattr() argument
76 static inline int ima_inode_removexattr(struct dentry *dentry, in ima_inode_removexattr() argument
Dtracefs.h28 struct dentry *tracefs_create_file(const char *name, umode_t mode,
29 struct dentry *parent, void *data,
32 struct dentry *tracefs_create_dir(const char *name, struct dentry *parent);
34 void tracefs_remove(struct dentry *dentry);
35 void tracefs_remove_recursive(struct dentry *dentry);
37 struct dentry *tracefs_create_instance_dir(const char *name, struct dentry *parent,
Dlsm_hooks.h1325 int (*quota_on)(struct dentry *dentry);
1342 int (*sb_statfs)(struct dentry *dentry);
1354 int (*dentry_init_security)(struct dentry *dentry, int mode,
1360 int (*path_unlink)(struct path *dir, struct dentry *dentry);
1361 int (*path_mkdir)(struct path *dir, struct dentry *dentry,
1363 int (*path_rmdir)(struct path *dir, struct dentry *dentry);
1364 int (*path_mknod)(struct path *dir, struct dentry *dentry,
1367 int (*path_symlink)(struct path *dir, struct dentry *dentry,
1369 int (*path_link)(struct dentry *old_dentry, struct path *new_dir,
1370 struct dentry *new_dentry);
[all …]
Dnamei.h73 extern struct dentry *kern_path_create(int, const char *, struct path *, unsigned int);
74 extern struct dentry *user_path_create(int, const char __user *, struct path *, unsigned int);
75 extern void done_path_create(struct path *, struct dentry *);
76 extern struct dentry *kern_path_locked(const char *, struct path *);
79 extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
85 extern struct dentry *lock_rename(struct dentry *, struct dentry *);
86 extern void unlock_rename(struct dentry *, struct dentry *);
Dexportfs.h6 struct dentry;
202 struct dentry * (*fh_to_dentry)(struct super_block *sb, struct fid *fid,
204 struct dentry * (*fh_to_parent)(struct super_block *sb, struct fid *fid,
206 int (*get_name)(struct dentry *parent, char *name,
207 struct dentry *child);
208 struct dentry * (*get_parent)(struct dentry *child);
221 extern int exportfs_encode_fh(struct dentry *dentry, struct fid *fid,
223 extern struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid,
224 int fh_len, int fileid_type, int (*acceptable)(void *, struct dentry *),
230 extern struct dentry *generic_fh_to_dentry(struct super_block *sb,
[all …]
Dfsnotify_backend.h251 extern int __fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask);
270 static inline void __fsnotify_update_dcache_flags(struct dentry *dentry) in __fsnotify_update_dcache_flags() argument
272 struct dentry *parent; in __fsnotify_update_dcache_flags()
274 assert_spin_locked(&dentry->d_lock); in __fsnotify_update_dcache_flags()
283 parent = dentry->d_parent; in __fsnotify_update_dcache_flags()
285 dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED; in __fsnotify_update_dcache_flags()
287 dentry->d_flags &= ~DCACHE_FSNOTIFY_PARENT_WATCHED; in __fsnotify_update_dcache_flags()
293 static inline void __fsnotify_d_instantiate(struct dentry *dentry, struct inode *inode) in __fsnotify_d_instantiate() argument
298 spin_lock(&dentry->d_lock); in __fsnotify_d_instantiate()
299 __fsnotify_update_dcache_flags(dentry); in __fsnotify_d_instantiate()
[all …]
Doprofile.h45 struct dentry;
53 int (*create_files)(struct dentry * root);
127 int oprofilefs_create_file(struct dentry * root,
130 int oprofilefs_create_file_perm(struct dentry * root,
134 int oprofilefs_create_ulong(struct dentry * root,
138 int oprofilefs_create_ro_ulong(struct dentry * root,
142 int oprofilefs_create_ro_atomic(struct dentry * root,
146 struct dentry *oprofilefs_mkdir(struct dentry *parent, char const *name);
Daudit.h137 extern void __audit_inode(struct filename *name, const struct dentry *dentry,
141 const struct dentry *dentry,
184 const struct dentry *dentry, in audit_inode() argument
190 __audit_inode(name, dentry, flags); in audit_inode()
199 const struct dentry *dentry) in audit_inode_parent_hidden() argument
202 __audit_inode(name, dentry, in audit_inode_parent_hidden()
206 const struct dentry *dentry, in audit_inode_child() argument
209 __audit_inode_child(parent, dentry, type); in audit_inode_child()
359 const struct dentry *dentry, in __audit_inode() argument
363 const struct dentry *dentry, in __audit_inode_child() argument
[all …]
Dfs.h1210 static inline struct dentry *file_dentry(const struct file *file) in file_dentry()
1212 struct dentry *dentry = file->f_path.dentry; in file_dentry() local
1214 if (unlikely(dentry->d_flags & DCACHE_OP_REAL)) in file_dentry()
1215 return dentry->d_op->d_real(dentry, file_inode(file)); in file_dentry()
1217 return dentry; in file_dentry()
1300 struct dentry *s_root;
1515 extern int vfs_create(struct inode *, struct dentry *, umode_t, bool);
1516 extern int vfs_mkdir(struct inode *, struct dentry *, umode_t);
1517 extern int vfs_mknod(struct inode *, struct dentry *, umode_t, dev_t);
1518 extern int vfs_symlink(struct inode *, struct dentry *, const char *);
[all …]
Dpath.h4 struct dentry;
9 struct dentry *dentry; member
17 return path1->mnt == path2->mnt && path1->dentry == path2->dentry; in path_equal()
Dnfs_fs.h80 struct dentry *dentry; member
309 static inline void nfs_set_verifier(struct dentry * dentry, unsigned long verf) in nfs_set_verifier() argument
311 dentry->d_time = verf; in nfs_set_verifier()
351 extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
363 extern int nfs_setattr(struct dentry *, struct iattr *);
370 extern struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry, fmode_t f_mode);
468 extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh,
500 extern void nfs_complete_unlink(struct dentry *dentry, struct inode *);
501 extern void nfs_wait_on_sillyrename(struct dentry *dentry);
502 extern void nfs_block_sillyrename(struct dentry *dentry);
[all …]
Drelay.h41 struct dentry *dentry; /* channel file dentry */ member
69 struct dentry *parent; /* parent dentry passed to open */
143 struct dentry *(*create_buf_file)(const char *filename,
144 struct dentry *parent,
159 int (*remove_buf_file)(struct dentry *dentry);
167 struct dentry *parent,
174 struct dentry *parent);
Dfault-inject.h30 struct dentry *dname;
49 struct dentry *fault_create_debugfs_attr(const char *name,
50 struct dentry *parent, struct fault_attr *attr);
54 static inline struct dentry *fault_create_debugfs_attr(const char *name, in fault_create_debugfs_attr()
55 struct dentry *parent, struct fault_attr *attr) in fault_create_debugfs_attr()
/linux-4.4.14/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 …]
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 …]
Ddir.c17 void ovl_cleanup(struct inode *wdir, struct dentry *wdentry) in ovl_cleanup()
34 struct dentry *ovl_lookup_temp(struct dentry *workdir, struct dentry *dentry) in ovl_lookup_temp() argument
36 struct dentry *temp; in ovl_lookup_temp()
39 snprintf(name, sizeof(name), "#%lx", (unsigned long) dentry); in ovl_lookup_temp()
52 static struct dentry *ovl_whiteout(struct dentry *workdir, in ovl_whiteout()
53 struct dentry *dentry) in ovl_whiteout() argument
56 struct dentry *whiteout; in ovl_whiteout()
59 whiteout = ovl_lookup_temp(workdir, dentry); in ovl_whiteout()
72 int ovl_create_real(struct inode *dir, struct dentry *newdentry, in ovl_create_real()
74 struct dentry *hardlink, bool debug) in ovl_create_real()
[all …]
Dsuper.c41 struct dentry *workdir;
51 struct dentry *__upperdentry;
66 static struct dentry *__ovl_dentry_lower(struct ovl_entry *oe) in __ovl_dentry_lower()
68 return oe->numlower ? oe->lowerstack[0].dentry : NULL; in __ovl_dentry_lower()
71 enum ovl_path_type ovl_path_type(struct dentry *dentry) in ovl_path_type() argument
73 struct ovl_entry *oe = dentry->d_fsdata; in ovl_path_type()
83 if (oe->numlower && S_ISDIR(dentry->d_inode->i_mode)) in ovl_path_type()
94 static struct dentry *ovl_upperdentry_dereference(struct ovl_entry *oe) in ovl_upperdentry_dereference()
99 void ovl_path_upper(struct dentry *dentry, struct path *path) in ovl_path_upper() argument
101 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_path_upper()
[all …]
Dcopy_up.c23 int ovl_copy_xattr(struct dentry *old, struct dentry *new) in ovl_copy_xattr()
136 static char *ovl_read_symlink(struct dentry *realdentry) in ovl_read_symlink()
170 static int ovl_set_timestamps(struct dentry *upperdentry, struct kstat *stat) in ovl_set_timestamps()
182 int ovl_set_attr(struct dentry *upperdentry, struct kstat *stat) in ovl_set_attr()
207 static int ovl_copy_up_locked(struct dentry *workdir, struct dentry *upperdir, in ovl_copy_up_locked()
208 struct dentry *dentry, struct path *lowerpath, in ovl_copy_up_locked() argument
213 struct dentry *newdentry = NULL; in ovl_copy_up_locked()
214 struct dentry *upper = NULL; in ovl_copy_up_locked()
218 newdentry = ovl_lookup_temp(workdir, dentry); in ovl_copy_up_locked()
223 upper = lookup_one_len(dentry->d_name.name, upperdir, in ovl_copy_up_locked()
[all …]
Dreaddir.c173 static void ovl_cache_put(struct ovl_dir_file *od, struct dentry *dentry) in ovl_cache_put() argument
180 if (ovl_dir_cache(dentry) == cache) in ovl_cache_put()
181 ovl_set_dir_cache(dentry, NULL); in ovl_cache_put()
202 static int ovl_check_whiteouts(struct dentry *dir, struct ovl_readdir_data *rdd) in ovl_check_whiteouts()
206 struct dentry *dentry; in ovl_check_whiteouts() local
225 dentry = lookup_one_len(p->name, dir, p->len); in ovl_check_whiteouts()
226 if (!IS_ERR(dentry)) { in ovl_check_whiteouts()
227 p->is_whiteout = ovl_is_whiteout(dentry); in ovl_check_whiteouts()
228 dput(dentry); in ovl_check_whiteouts()
260 err = ovl_check_whiteouts(realpath->dentry, rdd); in ovl_dir_read()
[all …]
/linux-4.4.14/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 …]
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 …]
Dnamei.c478 dget(path->dentry); in path_get()
490 dput(path->dentry); in path_put()
578 return is_subdir(path->dentry, mnt->mnt_root); in path_connected()
632 path->dentry = NULL; in legitimize_path()
635 if (unlikely(!lockref_get_not_dead(&path->dentry->d_lockref))) { in legitimize_path()
636 path->dentry = NULL; in legitimize_path()
639 return !read_seqcount_retry(&path->dentry->d_seq, seq); in legitimize_path()
680 static int unlazy_walk(struct nameidata *nd, struct dentry *dentry, unsigned seq) in unlazy_walk() argument
682 struct dentry *parent = nd->path.dentry; in unlazy_walk()
705 if (!dentry) { in unlazy_walk()
[all …]
Dnsfs.c15 static char *ns_dname(struct dentry *dentry, char *buffer, int buflen) in ns_dname() argument
17 struct inode *inode = d_inode(dentry); in ns_dname()
18 const struct proc_ns_operations *ns_ops = dentry->d_fsdata; in ns_dname()
20 return dynamic_dname(dentry, buffer, buflen, "%s:[%lu]", in ns_dname()
24 static void ns_prune_dentry(struct dentry *dentry) in ns_prune_dentry() argument
26 struct inode *inode = d_inode(dentry); in ns_prune_dentry()
52 struct dentry *dentry; in ns_get_path() local
67 dentry = (struct dentry *)d; in ns_get_path()
68 if (!lockref_get_not_dead(&dentry->d_lockref)) in ns_get_path()
74 path->dentry = dentry; in ns_get_path()
[all …]
Dlibfs.c23 int simple_getattr(struct vfsmount *mnt, struct dentry *dentry, in simple_getattr() argument
26 struct inode *inode = d_inode(dentry); in simple_getattr()
33 int simple_statfs(struct dentry *dentry, struct kstatfs *buf) in simple_statfs() argument
35 buf->f_type = dentry->d_sb->s_magic; in simple_statfs()
46 int always_delete_dentry(const struct dentry *dentry) in always_delete_dentry() argument
61 struct dentry *simple_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) in simple_lookup() argument
63 if (dentry->d_name.len > NAME_MAX) in simple_lookup()
65 if (!dentry->d_sb->s_d_op) in simple_lookup()
66 d_set_d_op(dentry, &simple_dentry_operations); in simple_lookup()
67 d_add(dentry, NULL); in simple_lookup()
[all …]
Dmount.h25 struct dentry *m_dentry;
33 struct dentry *mnt_mountpoint;
67 struct dentry *mnt_ex_mountpoint;
88 extern struct mount *__lookup_mnt(struct vfsmount *, struct dentry *);
89 extern struct mount *__lookup_mnt_last(struct vfsmount *, struct dentry *);
94 extern void __detach_mounts(struct dentry *dentry);
96 static inline void detach_mounts(struct dentry *dentry) in detach_mounts() argument
98 if (!d_mountpoint(dentry)) in detach_mounts()
100 __detach_mounts(dentry); in detach_mounts()
131 extern bool __is_local_mountpoint(struct dentry *dentry);
[all …]
Dxattr.c92 int __vfs_setxattr_noperm(struct dentry *dentry, const char *name, in __vfs_setxattr_noperm() argument
95 struct inode *inode = dentry->d_inode; in __vfs_setxattr_noperm()
103 error = inode->i_op->setxattr(dentry, name, value, size, flags); in __vfs_setxattr_noperm()
105 fsnotify_xattr(dentry); in __vfs_setxattr_noperm()
106 security_inode_post_setxattr(dentry, name, value, in __vfs_setxattr_noperm()
114 fsnotify_xattr(dentry); in __vfs_setxattr_noperm()
122 vfs_setxattr(struct dentry *dentry, const char *name, const void *value, in vfs_setxattr() argument
125 struct inode *inode = dentry->d_inode; in vfs_setxattr()
133 error = security_inode_setxattr(dentry, name, value, size, flags); in vfs_setxattr()
137 error = __vfs_setxattr_noperm(dentry, name, value, size, flags); in vfs_setxattr()
[all …]
Dbinfmt_misc.c56 struct dentry *dentry; member
583 struct dentry *dentry; in kill_node() local
586 dentry = e->dentry; in kill_node()
587 if (dentry) { in kill_node()
589 e->dentry = NULL; in kill_node()
593 if (dentry) { in kill_node()
594 drop_nlink(d_inode(dentry)); in kill_node()
595 d_drop(dentry); in kill_node()
596 dput(dentry); in kill_node()
625 struct dentry *root; in bm_entry_write()
[all …]
Dnamespace.c81 static inline struct hlist_head *m_hash(struct vfsmount *mnt, struct dentry *dentry) in m_hash() argument
84 tmp += ((unsigned long)dentry / L1_CACHE_BYTES); in m_hash()
89 static inline struct hlist_head *mp_hash(struct dentry *dentry) in mp_hash() argument
91 unsigned long tmp = ((unsigned long)dentry / L1_CACHE_BYTES); in mp_hash()
629 struct mount *__lookup_mnt(struct vfsmount *mnt, struct dentry *dentry) in __lookup_mnt() argument
631 struct hlist_head *head = m_hash(mnt, dentry); in __lookup_mnt()
635 if (&p->mnt_parent->mnt == mnt && p->mnt_mountpoint == dentry) in __lookup_mnt()
644 struct mount *__lookup_mnt_last(struct vfsmount *mnt, struct dentry *dentry) in __lookup_mnt_last() argument
647 p = __lookup_mnt(mnt, dentry); in __lookup_mnt_last()
653 if (&p->mnt_parent->mnt != mnt || p->mnt_mountpoint != dentry) in __lookup_mnt_last()
[all …]
Dattr.c190 int notify_change(struct dentry * dentry, struct iattr * attr, struct inode **delegated_inode) in notify_change() argument
192 struct inode *inode = dentry->d_inode; in notify_change()
222 error = security_inode_need_killpriv(dentry); in notify_change()
224 error = security_inode_killpriv(dentry); in notify_change()
258 error = security_inode_setattr(dentry, attr); in notify_change()
266 error = inode->i_op->setattr(dentry, attr); in notify_change()
268 error = simple_setattr(dentry, attr); in notify_change()
271 fsnotify_change(dentry, ia_valid); in notify_change()
272 ima_inode_post_setattr(dentry); in notify_change()
273 evm_inode_post_setattr(dentry, ia_valid); in notify_change()
Danon_inodes.c31 static char *anon_inodefs_dname(struct dentry *dentry, char *buffer, int buflen) in anon_inodefs_dname() argument
33 return dynamic_dname(dentry, buffer, buflen, "anon_inode:%s", in anon_inodefs_dname()
34 dentry->d_name.name); in anon_inodefs_dname()
41 static struct dentry *anon_inodefs_mount(struct file_system_type *fs_type, in anon_inodefs_mount()
92 path.dentry = d_alloc_pseudo(anon_inode_mnt->mnt_sb, &this); in anon_inode_getfile()
93 if (!path.dentry) in anon_inode_getfile()
103 d_instantiate(path.dentry, anon_inode_inode); in anon_inode_getfile()
Dopen.c37 int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs, in do_truncate() argument
55 ret = dentry_needs_remove_privs(dentry); in do_truncate()
61 mutex_lock(&dentry->d_inode->i_mutex); in do_truncate()
63 ret = notify_change(dentry, &newattrs, NULL); in do_truncate()
64 mutex_unlock(&dentry->d_inode->i_mutex); in do_truncate()
73 inode = path->dentry->d_inode; in vfs_truncate()
109 error = do_truncate(path->dentry, length, 0, NULL); in vfs_truncate()
157 struct dentry *dentry; in do_sys_ftruncate() local
173 dentry = f.file->f_path.dentry; in do_sys_ftruncate()
174 inode = dentry->d_inode; in do_sys_ftruncate()
[all …]
/linux-4.4.14/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 …]
Dautofs_i.h61 struct dentry *dentry; member
137 static inline struct autofs_info *autofs4_dentry_ino(struct dentry *dentry) in autofs4_dentry_ino() argument
139 return (struct autofs_info *)(dentry->d_fsdata); in autofs4_dentry_ino()
154 int is_autofs4_dentry(struct dentry *);
155 int autofs4_expire_wait(struct dentry *dentry, int rcu_walk);
163 struct dentry *autofs4_expire_direct(struct super_block *sb,
166 struct dentry *autofs4_expire_indirect(struct super_block *sb,
184 static inline void __managed_dentry_set_managed(struct dentry *dentry) in __managed_dentry_set_managed() argument
186 dentry->d_flags |= (DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT); in __managed_dentry_set_managed()
189 static inline void managed_dentry_set_managed(struct dentry *dentry) in managed_dentry_set_managed() argument
[all …]
Dwaitq.c181 struct dentry *dentry, char **name) in autofs4_getpath() argument
183 struct dentry *root = sbi->sb->s_root; in autofs4_getpath()
184 struct dentry *tmp; in autofs4_getpath()
197 for (tmp = dentry ; tmp != root ; tmp = tmp->d_parent) in autofs4_getpath()
209 p = buf + len - dentry->d_name.len; in autofs4_getpath()
210 strncpy(p, dentry->d_name.name, dentry->d_name.len); in autofs4_getpath()
212 for (tmp = dentry->d_parent; tmp != root ; tmp = tmp->d_parent) { in autofs4_getpath()
251 struct dentry*dentry, enum autofs_notify notify) in validate_request() argument
269 ino = autofs4_dentry_ino(dentry); in validate_request()
314 struct dentry *new = NULL; in validate_request()
[all …]
Dsymlink.c15 static const char *autofs4_follow_link(struct dentry *dentry, void **cookie) in autofs4_follow_link() argument
17 struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); in autofs4_follow_link()
18 struct autofs_info *ino = autofs4_dentry_ino(dentry); in autofs4_follow_link()
21 return d_inode(dentry)->i_private; in autofs4_follow_link()
/linux-4.4.14/drivers/net/wireless/ti/wl1251/
Dwl1251.h160 struct dentry *rootdir;
161 struct dentry *fw_statistics;
163 struct dentry *tx_internal_desc_overflow;
165 struct dentry *rx_out_of_mem;
166 struct dentry *rx_hdr_overflow;
167 struct dentry *rx_hw_stuck;
168 struct dentry *rx_dropped;
169 struct dentry *rx_fcs_err;
170 struct dentry *rx_xfr_hint_trig;
171 struct dentry *rx_path_reset;
[all …]
/linux-4.4.14/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 …]
Ddcache.h44 int ocfs2_dentry_attach_lock(struct dentry *dentry, struct inode *inode,
50 struct dentry *ocfs2_find_local_alias(struct inode *inode, u64 parent_blkno,
53 void ocfs2_dentry_move(struct dentry *dentry, struct dentry *target,
57 void ocfs2_dentry_attach_gen(struct dentry *dentry);
Dnamei.c110 static struct dentry *ocfs2_lookup(struct inode *dir, struct dentry *dentry, in ocfs2_lookup() argument
116 struct dentry *ret; in ocfs2_lookup()
119 trace_ocfs2_lookup(dir, dentry, dentry->d_name.len, in ocfs2_lookup()
120 dentry->d_name.name, in ocfs2_lookup()
123 if (dentry->d_name.len > OCFS2_MAX_FILENAME_LEN) { in ocfs2_lookup()
136 status = ocfs2_lookup_ino_from_name(dir, dentry->d_name.name, in ocfs2_lookup()
137 dentry->d_name.len, &blkno); in ocfs2_lookup()
158 ret = d_splice_alias(inode, dentry); in ocfs2_lookup()
172 dentry = ret; in ocfs2_lookup()
174 status = ocfs2_dentry_attach_lock(dentry, inode, in ocfs2_lookup()
[all …]
Dexport.c50 static struct dentry *ocfs2_get_dentry(struct super_block *sb, in ocfs2_get_dentry()
57 struct dentry *result; in ocfs2_get_dentry()
145 static struct dentry *ocfs2_get_parent(struct dentry *child) in ocfs2_get_parent()
149 struct dentry *parent; in ocfs2_get_parent()
191 trace_ocfs2_encode_fh_begin(dentry, dentry->d_name.len, in ocfs2_encode_fh()
192 dentry->d_name.name, in ocfs2_encode_fh()
238 static struct dentry *ocfs2_fh_to_dentry(struct super_block *sb, in ocfs2_fh_to_dentry()
252 static struct dentry *ocfs2_fh_to_parent(struct super_block *sb, in ocfs2_fh_to_parent()
/linux-4.4.14/fs/debugfs/
Dinode.c150 static int debugfs_show_options(struct seq_file *m, struct dentry *root) in debugfs_show_options()
185 f = (struct vfsmount *(*)(void *))path->dentry->d_fsdata; in debugfs_automount()
186 return f(d_inode(path->dentry)->i_private); in debugfs_automount()
230 static struct dentry *debug_mount(struct file_system_type *fs_type, in debug_mount()
245 static struct dentry *start_creating(const char *name, struct dentry *parent) in start_creating()
247 struct dentry *dentry; in start_creating() local
269 dentry = lookup_one_len(name, parent, strlen(name)); in start_creating()
270 if (!IS_ERR(dentry) && d_really_is_positive(dentry)) { in start_creating()
271 dput(dentry); in start_creating()
272 dentry = ERR_PTR(-EEXIST); in start_creating()
[all …]
Dfile.c45 static struct dentry *debugfs_create_mode(const char *name, umode_t mode, in debugfs_create_mode()
46 struct dentry *parent, void *value, in debugfs_create_mode()
99 struct dentry *debugfs_create_u8(const char *name, umode_t mode, in debugfs_create_u8()
100 struct dentry *parent, u8 *value) in debugfs_create_u8()
145 struct dentry *debugfs_create_u16(const char *name, umode_t mode, in debugfs_create_u16()
146 struct dentry *parent, u16 *value) in debugfs_create_u16()
191 struct dentry *debugfs_create_u32(const char *name, umode_t mode, in debugfs_create_u32()
192 struct dentry *parent, u32 *value) in debugfs_create_u32()
238 struct dentry *debugfs_create_u64(const char *name, umode_t mode, in debugfs_create_u64()
239 struct dentry *parent, u64 *value) in debugfs_create_u64()
[all …]
/linux-4.4.14/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()
244 static int tracefs_show_options(struct seq_file *m, struct dentry *root) in tracefs_show_options()
[all …]
/linux-4.4.14/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 …]
/linux-4.4.14/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 …]
Dvfs_dentry.c50 static int v9fs_cached_dentry_delete(const struct dentry *dentry) in v9fs_cached_dentry_delete() argument
53 dentry, dentry); in v9fs_cached_dentry_delete()
56 if (d_really_is_negative(dentry)) in v9fs_cached_dentry_delete()
67 static void v9fs_dentry_release(struct dentry *dentry) in v9fs_dentry_release() argument
71 dentry, dentry); in v9fs_dentry_release()
72 hlist_for_each_safe(p, n, (struct hlist_head *)&dentry->d_fsdata) in v9fs_dentry_release()
74 dentry->d_fsdata = NULL; in v9fs_dentry_release()
77 static int v9fs_lookup_revalidate(struct dentry *dentry, unsigned int flags) in v9fs_lookup_revalidate() argument
86 inode = d_inode(dentry); in v9fs_lookup_revalidate()
94 fid = v9fs_fid_lookup(dentry); in v9fs_lookup_revalidate()
Dvfs_inode.c586 static int v9fs_remove(struct inode *dir, struct dentry *dentry, int flags) in v9fs_remove() argument
594 dir, dentry, flags); in v9fs_remove()
597 inode = d_inode(dentry); in v9fs_remove()
598 dfid = v9fs_fid_lookup(dentry->d_parent); in v9fs_remove()
605 retval = p9_client_unlinkat(dfid, dentry->d_name.name, in v9fs_remove()
609 v9fid = v9fs_fid_clone(dentry); in v9fs_remove()
643 struct dentry *dentry, char *extension, u32 perm, u8 mode) in v9fs_create() argument
650 p9_debug(P9_DEBUG_VFS, "name %pd\n", dentry); in v9fs_create()
655 name = (char *) dentry->d_name.name; in v9fs_create()
656 dfid = v9fs_fid_lookup(dentry->d_parent); in v9fs_create()
[all …]
Dvfs_inode_dotl.c51 v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, umode_t omode,
233 v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, umode_t omode, in v9fs_vfs_create_dotl() argument
236 return v9fs_vfs_mknod_dotl(dir, dentry, omode, 0); in v9fs_vfs_create_dotl()
240 v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry, in v9fs_vfs_atomic_open_dotl() argument
255 struct dentry *res = NULL; in v9fs_vfs_atomic_open_dotl()
257 if (d_unhashed(dentry)) { in v9fs_vfs_atomic_open_dotl()
258 res = v9fs_vfs_lookup(dir, dentry, 0); in v9fs_vfs_atomic_open_dotl()
263 dentry = res; in v9fs_vfs_atomic_open_dotl()
267 if (!(flags & O_CREAT) || d_really_is_positive(dentry)) in v9fs_vfs_atomic_open_dotl()
272 name = (char *) dentry->d_name.name; in v9fs_vfs_atomic_open_dotl()
[all …]
Dfid.h26 struct p9_fid *v9fs_fid_lookup(struct dentry *dentry);
27 struct p9_fid *v9fs_fid_clone(struct dentry *dentry);
28 void v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid);
29 struct p9_fid *v9fs_writeback_fid(struct dentry *dentry);
Dxattr.c70 ssize_t v9fs_xattr_get(struct dentry *dentry, const char *name, in v9fs_xattr_get() argument
77 fid = v9fs_fid_lookup(dentry); in v9fs_xattr_get()
96 int v9fs_xattr_set(struct dentry *dentry, const char *name, in v9fs_xattr_set() argument
99 struct p9_fid *fid = v9fs_fid_lookup(dentry); in v9fs_xattr_set()
135 ssize_t v9fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size) in v9fs_listxattr() argument
137 return v9fs_xattr_get(dentry, NULL, buffer, buffer_size); in v9fs_listxattr()
141 struct dentry *dentry, const char *name, in v9fs_xattr_handler_get() argument
148 return v9fs_xattr_get(dentry, full_name, buffer, size); in v9fs_xattr_handler_get()
152 struct dentry *dentry, const char *name, in v9fs_xattr_handler_set() argument
159 return v9fs_xattr_set(dentry, full_name, value, size, flags); in v9fs_xattr_handler_set()
Dv9fs.h146 extern struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
148 extern int v9fs_vfs_unlink(struct inode *i, struct dentry *d);
149 extern int v9fs_vfs_rmdir(struct inode *i, struct dentry *d);
150 extern int v9fs_vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
151 struct inode *new_dir, struct dentry *new_dentry);
174 static inline struct v9fs_session_info *v9fs_dentry2v9ses(struct dentry *dentry) in v9fs_dentry2v9ses() argument
176 return dentry->d_sb->s_fs_info; in v9fs_dentry2v9ses()
/linux-4.4.14/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 …]
Dexport.c61 static struct dentry *__fh_to_dentry(struct super_block *sb, u64 ino) in __fh_to_dentry()
65 struct dentry *dentry; in __fh_to_dentry() local
91 dentry = d_obtain_alias(inode); in __fh_to_dentry()
92 if (IS_ERR(dentry)) { in __fh_to_dentry()
94 return dentry; in __fh_to_dentry()
96 err = ceph_init_dentry(dentry); in __fh_to_dentry()
98 dput(dentry); in __fh_to_dentry()
101 dout("__fh_to_dentry %llx %p dentry %p\n", ino, inode, dentry); in __fh_to_dentry()
102 return dentry; in __fh_to_dentry()
108 static struct dentry *ceph_fh_to_dentry(struct super_block *sb, in ceph_fh_to_dentry()
[all …]
Dsuper.h96 struct dentry *debugfs_dentry_lru, *debugfs_caps;
97 struct dentry *debugfs_congestion_kb;
98 struct dentry *debugfs_bdi;
99 struct dentry *debugfs_mdsc, *debugfs_mdsmap;
100 struct dentry *debugfs_mds_sessions;
248 struct dentry *dentry; member
535 static inline struct ceph_dentry_info *ceph_dentry(struct dentry *dentry) in ceph_dentry() argument
537 return (struct ceph_dentry_info *)dentry->d_fsdata; in ceph_dentry()
649 struct dentry **dentries;
791 extern int ceph_setattr(struct dentry *dentry, struct iattr *attr);
[all …]
/linux-4.4.14/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 …]
Dxattr_user.c10 user_get(const struct xattr_handler *handler, struct dentry *dentry, in user_get() argument
16 if (!reiserfs_xattrs_user(dentry->d_sb)) in user_get()
18 return reiserfs_xattr_get(d_inode(dentry), name, buffer, size); in user_get()
22 user_set(const struct xattr_handler *handler, struct dentry *dentry, in user_set() argument
28 if (!reiserfs_xattrs_user(dentry->d_sb)) in user_set()
30 return reiserfs_xattr_set(d_inode(dentry), name, buffer, size, flags); in user_set()
34 struct dentry *dentry, char *list, size_t list_size, in user_list() argument
39 if (!reiserfs_xattrs_user(dentry->d_sb)) in user_list()
Dxattr_trusted.c11 trusted_get(const struct xattr_handler *handler, struct dentry *dentry, in trusted_get() argument
17 if (!capable(CAP_SYS_ADMIN) || IS_PRIVATE(d_inode(dentry))) in trusted_get()
20 return reiserfs_xattr_get(d_inode(dentry), name, buffer, size); in trusted_get()
24 trusted_set(const struct xattr_handler *handler, struct dentry *dentry, in trusted_set() argument
30 if (!capable(CAP_SYS_ADMIN) || IS_PRIVATE(d_inode(dentry))) in trusted_set()
33 return reiserfs_xattr_set(d_inode(dentry), name, buffer, size, flags); in trusted_set()
37 struct dentry *dentry, char *list, size_t list_size, in trusted_list() argument
42 if (!capable(CAP_SYS_ADMIN) || IS_PRIVATE(d_inode(dentry))) in trusted_list()
Dxattr_security.c12 security_get(const struct xattr_handler *handler, struct dentry *dentry, in security_get() argument
18 if (IS_PRIVATE(d_inode(dentry))) in security_get()
21 return reiserfs_xattr_get(d_inode(dentry), name, buffer, size); in security_get()
25 security_set(const struct xattr_handler *handler, struct dentry *dentry, in security_set() argument
31 if (IS_PRIVATE(d_inode(dentry))) in security_set()
34 return reiserfs_xattr_set(d_inode(dentry), name, buffer, size, flags); in security_set()
38 struct dentry *dentry, char *list, size_t list_len, in security_list() argument
43 if (IS_PRIVATE(d_inode(dentry))) in security_list()
Dxattr.h7 struct dentry;
21 ssize_t reiserfs_getxattr(struct dentry *dentry, const char *name,
23 int reiserfs_setxattr(struct dentry *dentry, const char *name,
25 ssize_t reiserfs_listxattr(struct dentry *dentry, char *buffer, size_t size);
26 int reiserfs_removexattr(struct dentry *dentry, const char *name);
Dnamei.c352 static struct dentry *reiserfs_lookup(struct inode *dir, struct dentry *dentry, in reiserfs_lookup() argument
360 if (REISERFS_MAX_NAME(dir->i_sb->s_blocksize) < dentry->d_name.len) in reiserfs_lookup()
367 reiserfs_find_entry(dir, dentry->d_name.name, dentry->d_name.len, in reiserfs_lookup()
390 return d_splice_alias(inode, dentry); in reiserfs_lookup()
397 struct dentry *reiserfs_get_parent(struct dentry *child) in reiserfs_get_parent()
619 static int reiserfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, in reiserfs_create() argument
649 retval = reiserfs_security_init(dir, inode, &dentry->d_name, &security); in reiserfs_create()
664 reiserfs_new_inode(&th, dir, mode, NULL, 0 /*i_size */ , dentry, in reiserfs_create()
674 reiserfs_add_entry(&th, dir, dentry->d_name.name, in reiserfs_create()
675 dentry->d_name.len, inode, 1 /*visible */ ); in reiserfs_create()
[all …]
/linux-4.4.14/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 …]
Dnamei.c100 struct dentry *dentry, in cachefiles_mark_object_buried() argument
106 _enter(",'%pd'", dentry); in cachefiles_mark_object_buried()
113 if (object->dentry > dentry) in cachefiles_mark_object_buried()
115 else if (object->dentry < dentry) in cachefiles_mark_object_buried()
130 dentry); in cachefiles_mark_object_buried()
153 struct dentry *dentry; in cachefiles_mark_object_active() local
166 dentry = object->dentry; in cachefiles_mark_object_active()
175 if (xobject->dentry > dentry) in cachefiles_mark_object_active()
177 else if (xobject->dentry < dentry) in cachefiles_mark_object_active()
268 struct dentry *dir, in cachefiles_bury_object()
[all …]
/linux-4.4.14/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 …]
Ddentry.c45 static int ecryptfs_d_revalidate(struct dentry *dentry, unsigned int flags) in ecryptfs_d_revalidate() argument
47 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_d_revalidate()
56 if (d_really_is_positive(dentry)) { in ecryptfs_d_revalidate()
57 struct inode *inode = d_inode(dentry); in ecryptfs_d_revalidate()
80 static void ecryptfs_d_release(struct dentry *dentry) in ecryptfs_d_release() argument
82 struct ecryptfs_dentry_info *p = dentry->d_fsdata; in ecryptfs_d_release()
Decryptfs_kernel.h499 ecryptfs_dentry_to_private(struct dentry *dentry) in ecryptfs_dentry_to_private() argument
501 return (struct ecryptfs_dentry_info *)dentry->d_fsdata; in ecryptfs_dentry_to_private()
505 ecryptfs_set_dentry_private(struct dentry *dentry, in ecryptfs_set_dentry_private() argument
508 dentry->d_fsdata = dentry_info; in ecryptfs_set_dentry_private()
511 static inline struct dentry *
512 ecryptfs_dentry_to_lower(struct dentry *dentry) in ecryptfs_dentry_to_lower() argument
514 return ((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_path.dentry; in ecryptfs_dentry_to_lower()
518 ecryptfs_dentry_to_lower_mnt(struct dentry *dentry) in ecryptfs_dentry_to_lower_mnt() argument
520 return ((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_path.mnt; in ecryptfs_dentry_to_lower_mnt()
524 ecryptfs_dentry_to_lower_path(struct dentry *dentry) in ecryptfs_dentry_to_lower_path() argument
[all …]
/linux-4.4.14/security/integrity/evm/
Devm_main.c74 static int evm_find_protected_xattrs(struct dentry *dentry) in evm_find_protected_xattrs() argument
76 struct inode *inode = d_backing_inode(dentry); in evm_find_protected_xattrs()
85 error = inode->i_op->getxattr(dentry, *xattr, NULL, 0); in evm_find_protected_xattrs()
110 static enum integrity_status evm_verify_hmac(struct dentry *dentry, in evm_verify_hmac() argument
127 rc = vfs_getxattr_alloc(dentry, XATTR_NAME_EVM, (char **)&xattr_data, 0, in evm_verify_hmac()
132 rc = evm_find_protected_xattrs(dentry); in evm_verify_hmac()
148 rc = evm_calc_hmac(dentry, xattr_name, xattr_value, in evm_verify_hmac()
158 rc = evm_calc_hash(dentry, xattr_name, xattr_value, in evm_verify_hmac()
169 if (!IS_RDONLY(d_backing_inode(dentry)) && in evm_verify_hmac()
170 !IS_IMMUTABLE(d_backing_inode(dentry))) in evm_verify_hmac()
[all …]
Devm_crypto.c128 static int evm_calc_hmac_or_hash(struct dentry *dentry, in evm_calc_hmac_or_hash() argument
134 struct inode *inode = d_backing_inode(dentry); in evm_calc_hmac_or_hash()
157 size = vfs_getxattr_alloc(dentry, *xattrname, in evm_calc_hmac_or_hash()
178 int evm_calc_hmac(struct dentry *dentry, const char *req_xattr_name, in evm_calc_hmac() argument
182 return evm_calc_hmac_or_hash(dentry, req_xattr_name, req_xattr_value, in evm_calc_hmac()
186 int evm_calc_hash(struct dentry *dentry, const char *req_xattr_name, in evm_calc_hash() argument
190 return evm_calc_hmac_or_hash(dentry, req_xattr_name, req_xattr_value, in evm_calc_hash()
199 int evm_update_evmxattr(struct dentry *dentry, const char *xattr_name, in evm_update_evmxattr() argument
202 struct inode *inode = d_backing_inode(dentry); in evm_update_evmxattr()
206 rc = evm_calc_hmac(dentry, xattr_name, xattr_value, in evm_update_evmxattr()
[all …]
Devm.h39 int evm_update_evmxattr(struct dentry *dentry,
43 int evm_calc_hmac(struct dentry *dentry, const char *req_xattr_name,
46 int evm_calc_hash(struct dentry *dentry, const char *req_xattr_name,
/linux-4.4.14/fs/nfs/
Dnamespace.c50 char *nfs_path(char **p, struct dentry *dentry, char *buffer, ssize_t buflen, in nfs_path() argument
66 spin_lock(&dentry->d_lock); in nfs_path()
67 if (IS_ROOT(dentry)) in nfs_path()
69 namelen = dentry->d_name.len; in nfs_path()
74 memcpy(end, dentry->d_name.name, namelen); in nfs_path()
76 spin_unlock(&dentry->d_lock); in nfs_path()
77 dentry = dentry->d_parent; in nfs_path()
80 spin_unlock(&dentry->d_lock); in nfs_path()
86 spin_unlock(&dentry->d_lock); in nfs_path()
93 base = dentry->d_fsdata; 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 …]
Ddir.c121 if (filp->f_path.dentry == filp->f_path.mnt->mnt_root) { in nfs_opendir()
415 int nfs_same_file(struct dentry *dentry, struct nfs_entry *entry) in nfs_same_file() argument
419 if (d_really_is_negative(dentry)) in nfs_same_file()
422 nfsi = NFS_I(d_inode(dentry)); in nfs_same_file()
470 void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry) in nfs_prime_dcache()
473 struct dentry *dentry; in nfs_prime_dcache() local
474 struct dentry *alias; in nfs_prime_dcache()
491 dentry = d_lookup(parent, &filename); in nfs_prime_dcache()
492 if (dentry != NULL) { in nfs_prime_dcache()
494 if (!nfs_fsid_equal(&NFS_SB(dentry->d_sb)->fsid, in nfs_prime_dcache()
[all …]
Dnfstrace.h172 const struct dentry *dentry,
176 TP_ARGS(dir, dentry, flags),
182 __string(name, dentry->d_name.name)
189 __assign_str(name, dentry->d_name.name);
206 const struct dentry *dentry, \
209 TP_ARGS(dir, dentry, flags))
214 const struct dentry *dentry,
219 TP_ARGS(dir, dentry, flags, error),
226 __string(name, dentry->d_name.name)
234 __assign_str(name, dentry->d_name.name);
[all …]
Dinternal.h40 const struct dentry *dentry; member
137 int (*set_security)(struct super_block *, struct dentry *, struct nfs_mount_info *);
350 struct dentry *nfs_lookup(struct inode *, struct dentry *, unsigned int);
351 int nfs_create(struct inode *, struct dentry *, umode_t, bool);
352 int nfs_mkdir(struct inode *, struct dentry *, umode_t);
353 int nfs_rmdir(struct inode *, struct dentry *);
354 int nfs_unlink(struct inode *, struct dentry *);
355 int nfs_symlink(struct inode *, struct dentry *, const char *);
356 int nfs_link(struct dentry *, struct inode *, struct dentry *);
357 int nfs_mknod(struct inode *, struct dentry *, umode_t, dev_t);
[all …]
Dnfs4namespace.c83 static char *nfs4_path(struct dentry *dentry, char *buffer, ssize_t buflen) in nfs4_path() argument
86 char *path = nfs_path(&limit, dentry, buffer, buflen, in nfs4_path()
100 static int nfs4_validate_fspath(struct dentry *dentry, in nfs4_validate_fspath() argument
106 path = nfs4_path(dentry, page, PAGE_SIZE); in nfs4_validate_fspath()
296 static struct vfsmount *nfs_follow_referral(struct dentry *dentry, in nfs_follow_referral() argument
301 .sb = dentry->d_sb, in nfs_follow_referral()
302 .dentry = dentry, in nfs_follow_referral()
303 .authflavor = NFS_SB(dentry->d_sb)->client->cl_auth->au_flavor, in nfs_follow_referral()
311 dprintk("%s: referral at %pd2\n", __func__, dentry); in nfs_follow_referral()
322 error = nfs4_validate_fspath(dentry, locations, page, page2); in nfs_follow_referral()
[all …]
Dnfs4super.c20 static struct dentry *nfs4_remote_mount(struct file_system_type *fs_type,
22 static struct dentry *nfs4_referral_mount(struct file_system_type *fs_type,
24 static struct dentry *nfs4_remote_referral_mount(struct file_system_type *fs_type,
106 static struct dentry *
112 struct dentry *mntroot = ERR_PTR(-ENOMEM); in nfs4_remote_mount()
216 static struct dentry *nfs_follow_remote_path(struct vfsmount *root_mnt, in nfs_follow_remote_path()
219 struct dentry *dentry; in nfs_follow_remote_path() local
231 dentry = mount_subtree(root_mnt, export_path); in nfs_follow_remote_path()
234 return dentry; in nfs_follow_remote_path()
237 struct dentry *nfs4_try_mount(int flags, const char *dev_name, in nfs4_try_mount()
[all …]
Dproc.c118 nfs_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, in nfs_proc_setattr() argument
121 struct inode *inode = d_inode(dentry); in nfs_proc_setattr()
204 struct dentry *dentry, struct iattr *sattr) in nfs_alloc_createdata() argument
212 data->arg.name = dentry->d_name.name; in nfs_alloc_createdata()
213 data->arg.len = dentry->d_name.len; in nfs_alloc_createdata()
229 nfs_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr, in nfs_proc_create() argument
238 dprintk("NFS call create %pd\n", dentry); in nfs_proc_create()
239 data = nfs_alloc_createdata(dir, dentry, sattr); in nfs_proc_create()
247 status = nfs_instantiate(dentry, data->res.fh, data->res.fattr, NULL); in nfs_proc_create()
258 nfs_proc_mknod(struct inode *dir, struct dentry *dentry, struct iattr *sattr, in nfs_proc_mknod() argument
[all …]
Dnfs3proc.c120 nfs3_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, in nfs3_proc_setattr() argument
123 struct inode *inode = d_inode(dentry); in nfs3_proc_setattr()
299 static int nfs3_do_create(struct inode *dir, struct dentry *dentry, struct nfs3_createdata *data) in nfs3_do_create() argument
306 status = nfs_instantiate(dentry, data->res.fh, data->res.fattr, NULL); in nfs3_do_create()
319 nfs3_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr, in nfs3_proc_create() argument
326 dprintk("NFS call create %pd\n", dentry); in nfs3_proc_create()
334 data->arg.create.name = dentry->d_name.name; in nfs3_proc_create()
335 data->arg.create.len = dentry->d_name.len; in nfs3_proc_create()
350 status = nfs3_do_create(dir, dentry, data); in nfs3_proc_create()
388 status = nfs3_proc_setattr(dentry, data->res.fattr, sattr); in nfs3_proc_create()
[all …]
/linux-4.4.14/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()
226 struct dentry * dentry, void * element, in configfs_make_dirent() argument
236 sd->s_dentry = dentry; in configfs_make_dirent()
237 if (dentry) in configfs_make_dirent()
238 dentry->d_fsdata = configfs_get(sd); in configfs_make_dirent()
272 static int configfs_create_dir(struct config_item *item, struct dentry *dentry) in configfs_create_dir() argument
276 struct dentry *p = dentry->d_parent; in configfs_create_dir()
280 error = configfs_dirent_exists(p->d_fsdata, dentry->d_name.name); in configfs_create_dir()
284 error = configfs_make_dirent(p->d_fsdata, dentry, item, mode, in configfs_create_dir()
[all …]
Dconfigfs_internal.h46 struct dentry * s_dentry;
72 extern int configfs_create(struct dentry *, umode_t mode, void (*init)(struct inode *));
76 struct dentry *, void *, umode_t, int);
79 extern void configfs_hash_and_remove(struct dentry * dir, const char * name);
82 extern void configfs_drop_dentry(struct configfs_dirent *sd, struct dentry *parent);
83 extern int configfs_setattr(struct dentry *dentry, struct iattr *iattr);
85 extern struct dentry *configfs_pin_fs(void);
97 extern int configfs_symlink(struct inode *dir, struct dentry *dentry,
99 extern int configfs_unlink(struct inode *dir, struct dentry *dentry);
107 struct dentry *parent,
[all …]
Dinode.c57 int configfs_setattr(struct dentry * dentry, struct iattr * iattr) in configfs_setattr() argument
59 struct inode * inode = d_inode(dentry); in configfs_setattr()
60 struct configfs_dirent * sd = dentry->d_fsdata; in configfs_setattr()
83 error = simple_setattr(dentry, iattr); in configfs_setattr()
179 int configfs_create(struct dentry * dentry, umode_t mode, void (*init)(struct inode *)) in configfs_create() argument
186 if (!dentry) in configfs_create()
189 if (d_really_is_positive(dentry)) in configfs_create()
192 sd = dentry->d_fsdata; in configfs_create()
193 inode = configfs_new_inode(mode, sd, dentry->d_sb); in configfs_create()
197 p_inode = d_inode(dentry->d_parent); in configfs_create()
[all …]
Dsymlink.c74 struct dentry *dentry) in create_link() argument
97 dentry); in create_link()
119 if (path->dentry->d_sb == sb) { in get_target()
120 *target = configfs_get_config_item(path->dentry); in get_target()
135 int configfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) in configfs_symlink() argument
144 sd = dentry->d_parent->d_fsdata; in configfs_symlink()
153 parent_item = configfs_get_config_item(dentry->d_parent); in configfs_symlink()
161 ret = get_target(symname, &path, &target_item, dentry->d_sb); in configfs_symlink()
168 ret = create_link(parent_item, target_item, dentry); in configfs_symlink()
185 int configfs_unlink(struct inode *dir, struct dentry *dentry) in configfs_unlink() argument
[all …]
Dfile.c64 static int fill_read_buffer(struct dentry * dentry, struct configfs_buffer * buffer) in fill_read_buffer() argument
66 struct configfs_attribute * attr = to_attr(dentry); in fill_read_buffer()
67 struct config_item * item = to_item(dentry->d_parent); in fill_read_buffer()
114 if ((retval = fill_read_buffer(file->f_path.dentry,buffer))) in configfs_read_file()
170 flush_write_buffer(struct dentry * dentry, struct configfs_buffer * buffer, size_t count) in flush_write_buffer() argument
172 struct configfs_attribute * attr = to_attr(dentry); in flush_write_buffer()
173 struct config_item * item = to_item(dentry->d_parent); in flush_write_buffer()
205 len = flush_write_buffer(file->f_path.dentry, buffer, len); in configfs_write_file()
214 struct config_item *item = configfs_get_config_item(file->f_path.dentry->d_parent); in check_perm()
215 struct configfs_attribute * attr = to_attr(file->f_path.dentry); in check_perm()
[all …]
/linux-4.4.14/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 …]
Daffs.h138 extern int affs_remove_header(struct dentry *dentry);
150 extern bool affs_nofilenametruncate(const struct dentry *dentry);
153 extern int affs_copy_name(unsigned char *bstr, struct dentry *dentry);
166 extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry, unsigned int);
167 extern int affs_unlink(struct inode *dir, struct dentry *dentry);
168 extern int affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool);
169 extern int affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode);
170 extern int affs_rmdir(struct inode *dir, struct dentry *dentry);
171 extern int affs_link(struct dentry *olddentry, struct inode *dir,
172 struct dentry *dentry);
[all …]
Damigaffs.c124 struct dentry *dentry; in affs_fix_dcache() local
126 hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) { in affs_fix_dcache()
127 if (entry_ino == (u32)(long)dentry->d_fsdata) { in affs_fix_dcache()
128 dentry->d_fsdata = (void *)inode->i_ino; in affs_fix_dcache()
139 affs_remove_link(struct dentry *dentry) in affs_remove_link() argument
141 struct inode *dir, *inode = d_inode(dentry); in affs_remove_link()
153 link_ino = (u32)(long)dentry->d_fsdata; in affs_remove_link()
264 affs_remove_header(struct dentry *dentry) in affs_remove_header() argument
271 dir = d_inode(dentry->d_parent); in affs_remove_header()
275 inode = d_inode(dentry); in affs_remove_header()
[all …]
/linux-4.4.14/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 …]
Dmntpt.c23 static struct dentry *afs_mntpt_lookup(struct inode *dir,
24 struct dentry *dentry,
105 static struct dentry *afs_mntpt_lookup(struct inode *dir, in afs_mntpt_lookup()
106 struct dentry *dentry, in afs_mntpt_lookup() argument
109 _enter("%p,%p{%pd2}", dir, dentry, dentry); in afs_mntpt_lookup()
125 static struct vfsmount *afs_mntpt_do_automount(struct dentry *mntpt) in afs_mntpt_do_automount()
231 _enter("{%pd}", path->dentry); in afs_d_automount()
233 newmnt = afs_mntpt_do_automount(path->dentry); in afs_d_automount()
/linux-4.4.14/arch/s390/hypfs/
Dinode.c31 static struct dentry *hypfs_create_update_file(struct dentry *dir);
36 struct dentry *update_file; /* file to trigger update */
46 static struct dentry *hypfs_last_dentry;
59 static void hypfs_add_dentry(struct dentry *dentry) in hypfs_add_dentry() argument
61 dentry->d_fsdata = hypfs_last_dentry; in hypfs_add_dentry()
62 hypfs_last_dentry = dentry; in hypfs_add_dentry()
65 static void hypfs_remove(struct dentry *dentry) in hypfs_remove() argument
67 struct dentry *parent; in hypfs_remove()
69 parent = dentry->d_parent; in hypfs_remove()
71 if (simple_positive(dentry)) { in hypfs_remove()
[all …]
Dhypfs.h22 extern struct dentry *hypfs_mkdir(struct dentry *parent, const char *name);
24 extern struct dentry *hypfs_create_u64(struct dentry *dir, const char *name,
27 extern struct dentry *hypfs_create_str(struct dentry *dir, const char *name,
33 extern int hypfs_diag_create_files(struct dentry *root);
38 extern int hypfs_vm_create_files(struct dentry *root);
68 struct dentry *dentry; member
/linux-4.4.14/fs/minix/
Dnamei.c9 static int add_nondir(struct dentry *dentry, struct inode *inode) in add_nondir() argument
11 int err = minix_add_link(dentry, inode); in add_nondir()
13 d_instantiate(dentry, inode); in add_nondir()
21 static struct dentry *minix_lookup(struct inode * dir, struct dentry *dentry, unsigned int flags) in minix_lookup() argument
26 if (dentry->d_name.len > minix_sb(dir->i_sb)->s_namelen) in minix_lookup()
29 ino = minix_inode_by_name(dentry); in minix_lookup()
35 d_add(dentry, inode); in minix_lookup()
39 static int minix_mknod(struct inode * dir, struct dentry *dentry, umode_t mode, dev_t rdev) in minix_mknod() argument
52 error = add_nondir(dentry, inode); in minix_mknod()
57 static int minix_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode) in minix_tmpfile() argument
[all …]
/linux-4.4.14/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()
101 struct dentry *dentry, struct svc_export *exp) in check_pseudo_root() argument
117 if (unlikely(!d_is_dir(dentry) && in check_pseudo_root()
118 !d_is_symlink(dentry))) in check_pseudo_root()
[all …]
Dvfs.c83 nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp, in nfsd_cross_mnt()
87 struct dentry *dentry = *dpp; in nfsd_cross_mnt() local
89 .dentry = dget(dentry)}; in nfsd_cross_mnt()
120 *dpp = path.dentry; in nfsd_cross_mnt()
121 path.dentry = dentry; in nfsd_cross_mnt()
133 struct dentry *dp; in follow_to_parent()
135 while (path->dentry == path->mnt->mnt_root && follow_up(path)) in follow_to_parent()
137 dp = dget_parent(path->dentry); in follow_to_parent()
138 dput(path->dentry); in follow_to_parent()
139 path->dentry = dp; in follow_to_parent()
[all …]
Dnfs4recover.c171 struct dentry *dir, *dentry; in nfsd4_create_clid_dir() local
193 dir = nn->rec_file->f_path.dentry; in nfsd4_create_clid_dir()
197 dentry = lookup_one_len(dname, dir, HEXDIR_LEN-1); in nfsd4_create_clid_dir()
198 if (IS_ERR(dentry)) { in nfsd4_create_clid_dir()
199 status = PTR_ERR(dentry); in nfsd4_create_clid_dir()
202 if (d_really_is_positive(dentry)) in nfsd4_create_clid_dir()
212 status = vfs_mkdir(d_inode(dir), dentry, S_IRWXU); in nfsd4_create_clid_dir()
214 dput(dentry); in nfsd4_create_clid_dir()
235 typedef int (recdir_func)(struct dentry *, struct dentry *, struct nfsd_net *);
270 struct dentry *dir = nn->rec_file->f_path.dentry; in nfsd4_list_rec_dir()
[all …]
/linux-4.4.14/drivers/base/
Ddevtmpfs.c57 static struct dentry *dev_mount(struct file_system_type *fs_type, int flags, in dev_mount()
152 struct dentry *dentry; in dev_mkdir() local
156 dentry = kern_path_create(AT_FDCWD, name, &path, LOOKUP_DIRECTORY); in dev_mkdir()
157 if (IS_ERR(dentry)) in dev_mkdir()
158 return PTR_ERR(dentry); in dev_mkdir()
160 err = vfs_mkdir(d_inode(path.dentry), dentry, mode); in dev_mkdir()
163 d_inode(dentry)->i_private = &thread; in dev_mkdir()
164 done_path_create(&path, dentry); in dev_mkdir()
198 struct dentry *dentry; in handle_create() local
202 dentry = kern_path_create(AT_FDCWD, nodename, &path, 0); in handle_create()
[all …]
/linux-4.4.14/net/sunrpc/
Drpc_pipe.c87 struct dentry *dentry; in rpc_timeout_upcall_queue() local
95 dentry = dget(pipe->dentry); in rpc_timeout_upcall_queue()
97 rpc_purge_list(dentry ? &RPC_I(d_inode(dentry))->waitq : NULL, in rpc_timeout_upcall_queue()
99 dput(dentry); in rpc_timeout_upcall_queue()
136 struct dentry *dentry; in rpc_queue_upcall() local
152 dentry = dget(pipe->dentry); in rpc_queue_upcall()
154 if (dentry) { in rpc_queue_upcall()
155 wake_up(&RPC_I(d_inode(dentry))->waitq); in rpc_queue_upcall()
156 dput(dentry); in rpc_queue_upcall()
182 pipe->dentry = NULL; in rpc_close_pipes()
[all …]
/linux-4.4.14/security/
Dinode.c35 static struct dentry *get_sb(struct file_system_type *fs_type, in get_sb()
77 struct dentry *securityfs_create_file(const char *name, umode_t mode, in securityfs_create_file()
78 struct dentry *parent, void *data, in securityfs_create_file()
81 struct dentry *dentry; in securityfs_create_file() local
103 dentry = lookup_one_len(name, parent, strlen(name)); in securityfs_create_file()
104 if (IS_ERR(dentry)) in securityfs_create_file()
107 if (d_really_is_positive(dentry)) { in securityfs_create_file()
130 d_instantiate(dentry, inode); in securityfs_create_file()
131 dget(dentry); in securityfs_create_file()
133 return dentry; in securityfs_create_file()
[all …]
Dsecurity.c201 int security_quota_on(struct dentry *dentry) in security_quota_on() argument
203 return call_int_hook(quota_on, 0, dentry); in security_quota_on()
300 int security_sb_statfs(struct dentry *dentry) in security_sb_statfs() argument
302 return call_int_hook(sb_statfs, 0, dentry); in security_sb_statfs()
357 int security_dentry_init_security(struct dentry *dentry, int mode, in security_dentry_init_security() argument
361 return call_int_hook(dentry_init_security, -EOPNOTSUPP, dentry, mode, in security_dentry_init_security()
413 int security_path_mknod(struct path *dir, struct dentry *dentry, umode_t mode, in security_path_mknod() argument
416 if (unlikely(IS_PRIVATE(d_backing_inode(dir->dentry)))) in security_path_mknod()
418 return call_int_hook(path_mknod, 0, dir, dentry, mode, dev); in security_path_mknod()
422 int security_path_mkdir(struct path *dir, struct dentry *dentry, umode_t mode) in security_path_mkdir() argument
[all …]
/linux-4.4.14/fs/ncpfs/
Ddir.c33 static int ncp_create(struct inode *, struct dentry *, umode_t, bool);
34 static struct dentry *ncp_lookup(struct inode *, struct dentry *, unsigned int);
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 *, unsigned int);
[all …]
Dncplib_kernel.h81 int ncp_del_file_or_subdir2(struct ncp_server *, struct dentry*);
116 int ncp_create_new(struct inode *dir, struct dentry *dentry,
171 #define NCP_GET_AGE(dentry) (jiffies - (dentry)->d_time) argument
173 #define NCP_TEST_AGE(server,dentry) (NCP_GET_AGE(dentry) < NCP_MAX_AGE(server)) argument
176 ncp_age_dentry(struct ncp_server* server, struct dentry* dentry) in ncp_age_dentry() argument
178 dentry->d_time = jiffies - NCP_MAX_AGE(server); in ncp_age_dentry()
182 ncp_new_dentry(struct dentry* dentry) in ncp_new_dentry() argument
184 dentry->d_time = jiffies; in ncp_new_dentry()
194 #define NCP_DIRCACHE_SIZE ((int)(PAGE_CACHE_SIZE/sizeof(struct dentry *)))
197 struct dentry *dentry[NCP_DIRCACHE_SIZE]; member
[all …]
/linux-4.4.14/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, struct qstr *qstr) in sysv_hash() argument
45 static struct dentry *sysv_lookup(struct inode * dir, struct dentry * dentry, unsigned int flags) in sysv_lookup() argument
50 if (dentry->d_name.len > SYSV_NAMELEN) in sysv_lookup()
52 ino = sysv_inode_by_name(dentry); in sysv_lookup()
59 d_add(dentry, inode); in sysv_lookup()
63 static int sysv_mknod(struct inode * dir, struct dentry * dentry, umode_t mode, dev_t rdev) in sysv_mknod() argument
77 err = add_nondir(dentry, inode); in sysv_mknod()
[all …]
/linux-4.4.14/mm/
Dhwpoison-inject.c11 static struct dentry *hwpoison_dir;
80 struct dentry *dentry; in pfn_inject_init() local
91 dentry = debugfs_create_file("corrupt-pfn", 0200, hwpoison_dir, in pfn_inject_init()
93 if (!dentry) in pfn_inject_init()
96 dentry = debugfs_create_file("unpoison-pfn", 0200, hwpoison_dir, in pfn_inject_init()
98 if (!dentry) in pfn_inject_init()
101 dentry = debugfs_create_u32("corrupt-filter-enable", 0600, in pfn_inject_init()
103 if (!dentry) in pfn_inject_init()
106 dentry = debugfs_create_u32("corrupt-filter-dev-major", 0600, in pfn_inject_init()
108 if (!dentry) in pfn_inject_init()
[all …]
/linux-4.4.14/fs/cifs/
Dcifsfs.h55 extern int cifs_create(struct inode *, struct dentry *, umode_t,
57 extern int cifs_atomic_open(struct inode *, struct dentry *,
60 extern struct dentry *cifs_lookup(struct inode *, struct dentry *,
62 extern int cifs_unlink(struct inode *dir, struct dentry *dentry);
63 extern int cifs_hardlink(struct dentry *, struct inode *, struct dentry *);
64 extern int cifs_mknod(struct inode *, struct dentry *, umode_t, dev_t);
65 extern int cifs_mkdir(struct inode *, struct dentry *, umode_t);
66 extern int cifs_rmdir(struct inode *, struct dentry *);
67 extern int cifs_rename2(struct inode *, struct dentry *, struct inode *,
68 struct dentry *, unsigned int);
[all …]
Dexport.c49 static struct dentry *cifs_get_parent(struct dentry *dentry) in cifs_get_parent() argument
52 cifs_dbg(FYI, "get parent for %p\n", dentry); in cifs_get_parent()
/linux-4.4.14/fs/exofs/
Dnamei.c36 static inline int exofs_add_nondir(struct dentry *dentry, struct inode *inode) in exofs_add_nondir() argument
38 int err = exofs_add_link(dentry, inode); in exofs_add_nondir()
40 d_instantiate(dentry, inode); in exofs_add_nondir()
48 static struct dentry *exofs_lookup(struct inode *dir, struct dentry *dentry, in exofs_lookup() argument
54 if (dentry->d_name.len > EXOFS_NAME_LEN) in exofs_lookup()
57 ino = exofs_inode_by_name(dir, dentry); in exofs_lookup()
59 return d_splice_alias(inode, dentry); in exofs_lookup()
62 static int exofs_create(struct inode *dir, struct dentry *dentry, umode_t mode, in exofs_create() argument
72 err = exofs_add_nondir(dentry, inode); in exofs_create()
77 static int exofs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, in exofs_mknod() argument
[all …]
/linux-4.4.14/drivers/staging/lustre/lustre/llite/
Ddcache.c59 static void ll_release(struct dentry *de) in ll_release()
84 static int ll_dcompare(const struct dentry *parent, const struct dentry *dentry, in ll_dcompare() argument
95 name->len, name->name, dentry, dentry->d_flags, in ll_dcompare()
96 d_count(dentry)); in ll_dcompare()
99 if (d_mountpoint((struct dentry *)dentry)) in ll_dcompare()
102 if (d_lustre_invalid(dentry)) in ll_dcompare()
150 static int ll_ddelete(const struct dentry *de) in ll_ddelete()
155 d_lustre_invalid((struct dentry *)de) ? "deleting" : "keeping", in ll_ddelete()
174 if (d_lustre_invalid((struct dentry *)de)) in ll_ddelete()
179 int ll_d_init(struct dentry *de) in ll_d_init()
[all …]
Dnamei.c54 static int ll_create_it(struct inode *, struct dentry *,
145 struct dentry *dentry, *tmp_subdir; in ll_invalidate_negative_children() local
148 hlist_for_each_entry(dentry, &dir->i_dentry, d_u.d_alias) { in ll_invalidate_negative_children()
149 spin_lock(&dentry->d_lock); in ll_invalidate_negative_children()
150 if (!list_empty(&dentry->d_subdirs)) { in ll_invalidate_negative_children()
151 struct dentry *child; in ll_invalidate_negative_children()
154 &dentry->d_subdirs, in ll_invalidate_negative_children()
160 spin_unlock(&dentry->d_lock); in ll_invalidate_negative_children()
332 static struct dentry *ll_find_alias(struct inode *inode, struct dentry *dentry) in ll_find_alias() argument
334 struct dentry *alias, *discon_alias, *invalid_alias; in ll_find_alias()
[all …]
Dllite_internal.h465 struct dentry *ll_debugfs_entry;
636 extern struct dentry *llite_root;
662 int ldebugfs_register_mountpoint(struct dentry *parent,
689 struct dentry *ll_splice_alias(struct inode *inode, struct dentry *de);
729 int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat);
734 int ll_lov_setstripe_ea_info(struct inode *inode, struct dentry *dentry,
752 int ll_d_init(struct dentry *de);
770 int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import);
771 int ll_setattr(struct dentry *de, struct iattr *attr);
772 int ll_statfs(struct dentry *de, struct kstatfs *sfs);
[all …]
/linux-4.4.14/fs/ext2/
Dnamei.c39 static inline int ext2_add_nondir(struct dentry *dentry, struct inode *inode) in ext2_add_nondir() argument
41 int err = ext2_add_link(dentry, inode); in ext2_add_nondir()
44 d_instantiate(dentry, inode); in ext2_add_nondir()
57 static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, unsigned int flags) in ext2_lookup() argument
62 if (dentry->d_name.len > EXT2_NAME_LEN) in ext2_lookup()
65 ino = ext2_inode_by_name(dir, &dentry->d_name); in ext2_lookup()
76 return d_splice_alias(inode, dentry); in ext2_lookup()
79 struct dentry *ext2_get_parent(struct dentry *child) in ext2_get_parent()
96 static int ext2_create (struct inode * dir, struct dentry * dentry, umode_t mode, bool excl) in ext2_create() argument
105 inode = ext2_new_inode(dir, mode, &dentry->d_name); in ext2_create()
[all …]
Dxattr_user.c15 struct dentry *dentry, char *list, size_t list_size, in ext2_xattr_user_list() argument
21 if (!test_opt(dentry->d_sb, XATTR_USER)) in ext2_xattr_user_list()
34 struct dentry *dentry, const char *name, in ext2_xattr_user_get() argument
39 if (!test_opt(dentry->d_sb, XATTR_USER)) in ext2_xattr_user_get()
41 return ext2_xattr_get(d_inode(dentry), EXT2_XATTR_INDEX_USER, in ext2_xattr_user_get()
47 struct dentry *dentry, const char *name, in ext2_xattr_user_set() argument
52 if (!test_opt(dentry->d_sb, XATTR_USER)) in ext2_xattr_user_set()
55 return ext2_xattr_set(d_inode(dentry), EXT2_XATTR_INDEX_USER, in ext2_xattr_user_set()
Dxattr_trusted.c13 struct dentry *dentry, char *list, size_t list_size, in ext2_xattr_trusted_list() argument
32 struct dentry *dentry, const char *name, in ext2_xattr_trusted_get() argument
37 return ext2_xattr_get(d_inode(dentry), EXT2_XATTR_INDEX_TRUSTED, name, in ext2_xattr_trusted_get()
43 struct dentry *dentry, const char *name, in ext2_xattr_trusted_set() argument
48 return ext2_xattr_set(d_inode(dentry), EXT2_XATTR_INDEX_TRUSTED, name, in ext2_xattr_trusted_set()
Dxattr_security.c12 struct dentry *dentry, char *list, size_t list_size, in ext2_xattr_security_list() argument
28 struct dentry *dentry, const char *name, in ext2_xattr_security_get() argument
33 return ext2_xattr_get(d_inode(dentry), EXT2_XATTR_INDEX_SECURITY, name, in ext2_xattr_security_get()
39 struct dentry *dentry, const char *name, in ext2_xattr_security_set() argument
44 return ext2_xattr_set(d_inode(dentry), EXT2_XATTR_INDEX_SECURITY, name, in ext2_xattr_security_set()
/linux-4.4.14/fs/ufs/
Dnamei.c37 static inline int ufs_add_nondir(struct dentry *dentry, struct inode *inode) in ufs_add_nondir() argument
39 int err = ufs_add_link(dentry, inode); in ufs_add_nondir()
42 d_instantiate(dentry, inode); in ufs_add_nondir()
51 static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, unsigned int flags) in ufs_lookup() argument
56 if (dentry->d_name.len > UFS_MAXNAMLEN) in ufs_lookup()
59 ino = ufs_inode_by_name(dir, &dentry->d_name); in ufs_lookup()
62 return d_splice_alias(inode, dentry); in ufs_lookup()
73 static int ufs_create (struct inode * dir, struct dentry * dentry, umode_t mode, in ufs_create() argument
86 return ufs_add_nondir(dentry, inode); in ufs_create()
89 static int ufs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev) in ufs_mknod() argument
[all …]
/linux-4.4.14/drivers/edac/
Dedac_module.h70 struct dentry *edac_debugfs_create_dir(const char *dirname);
71 struct dentry *
72 edac_debugfs_create_dir_at(const char *dirname, struct dentry *parent);
73 struct dentry *
74 edac_debugfs_create_file(const char *name, umode_t mode, struct dentry *parent,
76 struct dentry *
77 edac_debugfs_create_x8(const char *name, umode_t mode, struct dentry *parent, u8 *value);
78 struct dentry *
79 edac_debugfs_create_x16(const char *name, umode_t mode, struct dentry *parent, u16 *value);
84 static inline struct dentry *edac_debugfs_create_dir(const char *dirname) { return NULL; } in edac_debugfs_create_dir()
[all …]
Ddebugfs.c3 static struct dentry *edac_debugfs;
61 struct dentry *d, *parent; in edac_create_debugfs_nodes()
106 struct dentry *edac_debugfs_create_dir(const char *dirname) in edac_debugfs_create_dir()
116 struct dentry *
117 edac_debugfs_create_dir_at(const char *dirname, struct dentry *parent) in edac_debugfs_create_dir_at()
132 struct dentry *
133 edac_debugfs_create_file(const char *name, umode_t mode, struct dentry *parent, in edac_debugfs_create_file()
144 struct dentry *edac_debugfs_create_x8(const char *name, umode_t mode, in edac_debugfs_create_x8()
145 struct dentry *parent, u8 *value) in edac_debugfs_create_x8()
155 struct dentry *edac_debugfs_create_x16(const char *name, umode_t mode, in edac_debugfs_create_x16()
[all …]
/linux-4.4.14/net/wimax/
Ddebugfs.c44 struct dentry *dentry; in wimax_debugfs_add() local
48 dentry = debugfs_create_dir(buf, NULL); in wimax_debugfs_add()
49 result = PTR_ERR(dentry); in wimax_debugfs_add()
50 if (IS_ERR(dentry)) { in wimax_debugfs_add()
58 wimax_dev->debugfs_dentry = dentry; in wimax_debugfs_add()
59 __debugfs_register("wimax_dl_", debugfs, dentry); in wimax_debugfs_add()
60 __debugfs_register("wimax_dl_", id_table, dentry); in wimax_debugfs_add()
61 __debugfs_register("wimax_dl_", op_msg, dentry); in wimax_debugfs_add()
62 __debugfs_register("wimax_dl_", op_reset, dentry); in wimax_debugfs_add()
63 __debugfs_register("wimax_dl_", op_rfkill, dentry); in wimax_debugfs_add()
[all …]
/linux-4.4.14/arch/powerpc/platforms/cell/spufs/
Dinode.c112 spufs_setattr(struct dentry *dentry, struct iattr *attr) in spufs_setattr() argument
114 struct inode *inode = d_inode(dentry); in spufs_setattr()
126 spufs_new_file(struct super_block *sb, struct dentry *dentry, in spufs_new_file() argument
146 d_add(dentry, inode); in spufs_new_file()
162 static void spufs_prune_dir(struct dentry *dir) in spufs_prune_dir()
164 struct dentry *dentry, *tmp; in spufs_prune_dir() local
167 list_for_each_entry_safe(dentry, tmp, &dir->d_subdirs, d_child) { in spufs_prune_dir()
168 spin_lock(&dentry->d_lock); in spufs_prune_dir()
169 if (simple_positive(dentry)) { in spufs_prune_dir()
170 dget_dlock(dentry); in spufs_prune_dir()
[all …]
Dsyscalls.c66 struct dentry *dentry; in do_spu_create() local
69 dentry = user_path_create(AT_FDCWD, pathname, &path, LOOKUP_DIRECTORY); in do_spu_create()
70 ret = PTR_ERR(dentry); in do_spu_create()
71 if (!IS_ERR(dentry)) { in do_spu_create()
72 ret = spufs_create(&path, dentry, flags, mode, neighbor); in do_spu_create()
73 done_path_create(&path, dentry); in do_spu_create()
/linux-4.4.14/drivers/net/wimax/i2400m/
Ddebugfs.c49 struct dentry *debugfs_create_netdev_queue_stopped( in debugfs_create_netdev_queue_stopped()
50 const char *name, struct dentry *parent, struct i2400m *i2400m) in debugfs_create_netdev_queue_stopped()
185 struct dentry *debugfs_create_i2400m_suspend( in debugfs_create_i2400m_suspend()
186 const char *name, struct dentry *parent, struct i2400m *i2400m) in debugfs_create_i2400m_suspend()
223 struct dentry *debugfs_create_i2400m_reset( in debugfs_create_i2400m_reset()
224 const char *name, struct dentry *parent, struct i2400m *i2400m) in debugfs_create_i2400m_reset()
243 struct dentry *dentry = i2400m->wimax_dev.debugfs_dentry; in i2400m_debugfs_add() local
244 struct dentry *fd; in i2400m_debugfs_add()
246 dentry = debugfs_create_dir("i2400m", dentry); in i2400m_debugfs_add()
247 result = PTR_ERR(dentry); in i2400m_debugfs_add()
[all …]
/linux-4.4.14/kernel/bpf/
Dinode.c122 static bool bpf_dname_reserved(const struct dentry *dentry) in bpf_dname_reserved() argument
124 return strchr(dentry->d_name.name, '.'); in bpf_dname_reserved()
127 static int bpf_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) in bpf_mkdir() argument
131 if (bpf_dname_reserved(dentry)) in bpf_mkdir()
144 d_instantiate(dentry, inode); in bpf_mkdir()
145 dget(dentry); in bpf_mkdir()
150 static int bpf_mkobj_ops(struct inode *dir, struct dentry *dentry, in bpf_mkobj_ops() argument
155 if (bpf_dname_reserved(dentry)) in bpf_mkobj_ops()
163 inode->i_private = dentry->d_fsdata; in bpf_mkobj_ops()
165 d_instantiate(dentry, inode); in bpf_mkobj_ops()
[all …]
/linux-4.4.14/fs/nfs/blocklayout/
Drpc_pipefs.c145 static struct dentry *nfs4blocklayout_register_sb(struct super_block *sb, in nfs4blocklayout_register_sb()
148 struct dentry *dir, *dentry; in nfs4blocklayout_register_sb() local
153 dentry = rpc_mkpipe_dentry(dir, "blocklayout", NULL, pipe); in nfs4blocklayout_register_sb()
155 return dentry; in nfs4blocklayout_register_sb()
161 if (pipe->dentry) in nfs4blocklayout_unregister_sb()
162 rpc_unlink(pipe->dentry); in nfs4blocklayout_unregister_sb()
171 struct dentry *dentry; in rpc_pipefs_event() local
184 dentry = nfs4blocklayout_register_sb(sb, nn->bl_device_pipe); in rpc_pipefs_event()
185 if (IS_ERR(dentry)) { in rpc_pipefs_event()
186 ret = PTR_ERR(dentry); in rpc_pipefs_event()
[all …]
/linux-4.4.14/security/integrity/ima/
Dima_appraise.c48 static int ima_fix_xattr(struct dentry *dentry, in ima_fix_xattr() argument
62 rc = __vfs_setxattr_noperm(dentry, XATTR_NAME_IMA, in ima_fix_xattr()
165 int ima_read_xattr(struct dentry *dentry, in ima_read_xattr() argument
168 struct inode *inode = d_backing_inode(dentry); in ima_read_xattr()
173 return vfs_getxattr_alloc(dentry, XATTR_NAME_IMA, (char **)xattr_value, in ima_read_xattr()
192 struct dentry *dentry = file->f_path.dentry; in ima_appraise_measurement() local
193 struct inode *inode = d_backing_inode(dentry); in ima_appraise_measurement()
213 status = evm_verifyxattr(dentry, XATTR_NAME_IMA, xattr_value, rc, iint); in ima_appraise_measurement()
275 if (!ima_fix_xattr(dentry, iint)) in ima_appraise_measurement()
292 struct dentry *dentry = file->f_path.dentry; in ima_update_xattr() local
[all …]
/linux-4.4.14/fs/nilfs2/
Dnamei.c49 static inline int nilfs_add_nondir(struct dentry *dentry, struct inode *inode) in nilfs_add_nondir() argument
51 int err = nilfs_add_link(dentry, inode); in nilfs_add_nondir()
53 d_instantiate(dentry, inode); in nilfs_add_nondir()
67 static struct dentry *
68 nilfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) in nilfs_lookup() argument
73 if (dentry->d_name.len > NILFS_NAME_LEN) in nilfs_lookup()
76 ino = nilfs_inode_by_name(dir, &dentry->d_name); in nilfs_lookup()
78 return d_splice_alias(inode, dentry); in nilfs_lookup()
89 static int nilfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, in nilfs_create() argument
106 err = nilfs_add_nondir(dentry, inode); in nilfs_create()
[all …]
/linux-4.4.14/include/linux/sunrpc/
Drpc_pipe_fs.h10 struct dentry *pdh_dentry;
22 int (*create)(struct dentry *dir,
24 void (*destroy)(struct dentry *dir,
56 struct dentry *dentry; member
85 extern struct dentry *rpc_d_lookup_sb(const struct super_block *sb,
97 extern struct dentry *rpc_create_client_dir(struct dentry *, const char *, struct rpc_clnt *);
118 extern struct dentry *rpc_create_cache_dir(struct dentry *,
122 extern void rpc_remove_cache_dir(struct dentry *);
124 extern int rpc_rmdir(struct dentry *dentry);
128 extern struct dentry *rpc_mkpipe_dentry(struct dentry *, const char *, void *,
[all …]
/linux-4.4.14/fs/proc/
Dfd.c83 static int tid_fd_revalidate(struct dentry *dentry, unsigned int flags) in tid_fd_revalidate() argument
94 inode = d_inode(dentry); in tid_fd_revalidate()
148 static int proc_fd_link(struct dentry *dentry, struct path *path) in proc_fd_link() argument
154 task = get_proc_task(d_inode(dentry)); in proc_fd_link()
161 int fd = proc_fd(d_inode(dentry)); in proc_fd_link()
179 proc_fd_instantiate(struct inode *dir, struct dentry *dentry, in proc_fd_instantiate() argument
199 d_set_d_op(dentry, &tid_fd_dentry_operations); in proc_fd_instantiate()
200 d_add(dentry, inode); in proc_fd_instantiate()
203 if (tid_fd_revalidate(dentry, 0)) in proc_fd_instantiate()
209 static struct dentry *proc_lookupfd_common(struct inode *dir, in proc_lookupfd_common()
[all …]
Dnamespaces.c33 static const char *proc_ns_follow_link(struct dentry *dentry, void **cookie) in proc_ns_follow_link() argument
35 struct inode *inode = d_inode(dentry); in proc_ns_follow_link()
54 static int proc_ns_readlink(struct dentry *dentry, char __user *buffer, int buflen) in proc_ns_readlink() argument
56 struct inode *inode = d_inode(dentry); in proc_ns_readlink()
82 struct dentry *dentry, struct task_struct *task, const void *ptr) in proc_ns_instantiate() argument
97 d_set_d_op(dentry, &pid_dentry_operations); in proc_ns_instantiate()
98 d_add(dentry, inode); in proc_ns_instantiate()
100 if (pid_revalidate(dentry, 0)) in proc_ns_instantiate()
138 static struct dentry *proc_ns_dir_lookup(struct inode *dir, in proc_ns_dir_lookup()
139 struct dentry *dentry, unsigned int flags) in proc_ns_dir_lookup() argument
[all …]
Dinternal.h55 int (*proc_get_link)(struct dentry *, struct path *);
163 extern int pid_getattr(struct vfsmount *, struct dentry *, struct kstat *);
164 extern int proc_setattr(struct dentry *, struct iattr *);
166 extern int pid_revalidate(struct dentry *, unsigned int);
167 extern int pid_delete_dentry(const struct dentry *);
169 extern struct dentry *proc_pid_lookup(struct inode *, struct dentry *, unsigned int);
173 typedef int instantiate_t(struct inode *, struct dentry *,
181 extern struct dentry *proc_lookup(struct inode *, struct dentry *, unsigned int);
182 extern struct dentry *proc_lookup_de(struct proc_dir_entry *, struct inode *,
183 struct dentry *);
Dbase.c170 static int proc_cwd_link(struct dentry *dentry, struct path *path) in proc_cwd_link() argument
172 struct task_struct *task = get_proc_task(d_inode(dentry)); in proc_cwd_link()
187 static int proc_root_link(struct dentry *dentry, struct path *path) in proc_root_link() argument
189 struct task_struct *task = get_proc_task(d_inode(dentry)); in proc_root_link()
707 int proc_setattr(struct dentry *dentry, struct iattr *attr) in proc_setattr() argument
710 struct inode *inode = d_inode(dentry); in proc_setattr()
1545 static int proc_exe_link(struct dentry *dentry, struct path *exe_path) in proc_exe_link() argument
1551 task = get_proc_task(d_inode(dentry)); in proc_exe_link()
1569 static const char *proc_pid_follow_link(struct dentry *dentry, void **cookie) in proc_pid_follow_link() argument
1571 struct inode *inode = d_inode(dentry); in proc_pid_follow_link()
[all …]
Dself.c9 static int proc_self_readlink(struct dentry *dentry, char __user *buffer, in proc_self_readlink() argument
12 struct pid_namespace *ns = dentry->d_sb->s_fs_info; in proc_self_readlink()
21 static const char *proc_self_follow_link(struct dentry *dentry, void **cookie) in proc_self_follow_link() argument
23 struct pid_namespace *ns = dentry->d_sb->s_fs_info; in proc_self_follow_link()
49 struct dentry *self; in proc_setup_self()
Dthread_self.c9 static int proc_thread_self_readlink(struct dentry *dentry, char __user *buffer, in proc_thread_self_readlink() argument
12 struct pid_namespace *ns = dentry->d_sb->s_fs_info; in proc_thread_self_readlink()
22 static const char *proc_thread_self_follow_link(struct dentry *dentry, void **cookie) in proc_thread_self_follow_link() argument
24 struct pid_namespace *ns = dentry->d_sb->s_fs_info; in proc_thread_self_follow_link()
50 struct dentry *thread_self; in proc_setup_thread_self()
/linux-4.4.14/fs/hfsplus/
Ddir.c22 static inline void hfsplus_instantiate(struct dentry *dentry, in hfsplus_instantiate() argument
25 dentry->d_fsdata = (void *)(unsigned long)cnid; in hfsplus_instantiate()
26 d_instantiate(dentry, inode); in hfsplus_instantiate()
30 static struct dentry *hfsplus_lookup(struct inode *dir, struct dentry *dentry, in hfsplus_lookup() argument
43 dentry->d_fsdata = NULL; in hfsplus_lookup()
48 &dentry->d_name); in hfsplus_lookup()
69 dentry->d_fsdata = (void *)(unsigned long)cnid; in hfsplus_lookup()
90 if (dentry->d_fsdata) { in hfsplus_lookup()
95 cnid = (unsigned long)dentry->d_fsdata; in hfsplus_lookup()
98 dentry->d_fsdata = (void *)(unsigned long)cnid; in hfsplus_lookup()
[all …]
Dxattr_trusted.c15 struct dentry *dentry, const char *name, in hfsplus_trusted_getxattr() argument
18 return hfsplus_getxattr(dentry, name, buffer, size, in hfsplus_trusted_getxattr()
24 struct dentry *dentry, const char *name, in hfsplus_trusted_setxattr() argument
27 return hfsplus_setxattr(dentry, name, buffer, size, flags, in hfsplus_trusted_setxattr()
Dxattr_user.c15 struct dentry *dentry, const char *name, in hfsplus_user_getxattr() argument
19 return hfsplus_getxattr(dentry, name, buffer, size, in hfsplus_user_getxattr()
24 struct dentry *dentry, const char *name, in hfsplus_user_setxattr() argument
27 return hfsplus_setxattr(dentry, name, buffer, size, flags, in hfsplus_user_setxattr()
Dxattr.h24 int hfsplus_setxattr(struct dentry *dentry, const char *name,
31 ssize_t hfsplus_getxattr(struct dentry *dentry, const char *name,
35 ssize_t hfsplus_listxattr(struct dentry *dentry, char *buffer, size_t size);
Dxattr_security.c17 struct dentry *dentry, const char *name, in hfsplus_security_getxattr() argument
20 return hfsplus_getxattr(dentry, name, buffer, size, in hfsplus_security_getxattr()
26 struct dentry *dentry, const char *name, in hfsplus_security_setxattr() argument
29 return hfsplus_setxattr(dentry, name, buffer, size, flags, in hfsplus_security_setxattr()
/linux-4.4.14/fs/kernfs/
Dkernfs-internal.h81 int kernfs_iop_setattr(struct dentry *dentry, struct iattr *iattr);
82 int kernfs_iop_getattr(struct vfsmount *mnt, struct dentry *dentry,
84 int kernfs_iop_setxattr(struct dentry *dentry, const char *name, const void *value,
86 int kernfs_iop_removexattr(struct dentry *dentry, const char *name);
87 ssize_t kernfs_iop_getxattr(struct dentry *dentry, const char *name, void *buf,
89 ssize_t kernfs_iop_listxattr(struct dentry *dentry, char *buf, size_t size);
Dinode.c112 int kernfs_iop_setattr(struct dentry *dentry, struct iattr *iattr) in kernfs_iop_setattr() argument
114 struct inode *inode = d_inode(dentry); in kernfs_iop_setattr()
115 struct kernfs_node *kn = dentry->d_fsdata; in kernfs_iop_setattr()
160 int kernfs_iop_setxattr(struct dentry *dentry, const char *name, in kernfs_iop_setxattr() argument
163 struct kernfs_node *kn = dentry->d_fsdata; in kernfs_iop_setxattr()
175 error = security_inode_setsecurity(d_inode(dentry), suffix, in kernfs_iop_setxattr()
179 error = security_inode_getsecctx(d_inode(dentry), in kernfs_iop_setxattr()
199 int kernfs_iop_removexattr(struct dentry *dentry, const char *name) in kernfs_iop_removexattr() argument
201 struct kernfs_node *kn = dentry->d_fsdata; in kernfs_iop_removexattr()
211 ssize_t kernfs_iop_getxattr(struct dentry *dentry, const char *name, void *buf, in kernfs_iop_getxattr() argument
[all …]
Ddir.c462 static int kernfs_dop_revalidate(struct dentry *dentry, unsigned int flags) in kernfs_dop_revalidate() argument
470 if (d_really_is_negative(dentry)) in kernfs_dop_revalidate()
473 kn = dentry->d_fsdata; in kernfs_dop_revalidate()
481 if (dentry->d_parent->d_fsdata != kn->parent) in kernfs_dop_revalidate()
485 if (strcmp(dentry->d_name.name, kn->name) != 0) in kernfs_dop_revalidate()
490 kernfs_info(dentry->d_sb)->ns != kn->ns) in kernfs_dop_revalidate()
501 static void kernfs_dop_release(struct dentry *dentry) in kernfs_dop_release() argument
503 kernfs_put(dentry->d_fsdata); in kernfs_dop_release()
522 struct kernfs_node *kernfs_node_from_dentry(struct dentry *dentry) in kernfs_node_from_dentry() argument
524 if (dentry->d_sb->s_op == &kernfs_sops) in kernfs_node_from_dentry()
[all …]
/linux-4.4.14/fs/ext4/
Dxattr_user.c16 struct dentry *dentry, char *list, size_t list_size, in ext4_xattr_user_list() argument
22 if (!test_opt(dentry->d_sb, XATTR_USER)) in ext4_xattr_user_list()
35 struct dentry *dentry, const char *name, in ext4_xattr_user_get() argument
40 if (!test_opt(dentry->d_sb, XATTR_USER)) in ext4_xattr_user_get()
42 return ext4_xattr_get(d_inode(dentry), EXT4_XATTR_INDEX_USER, in ext4_xattr_user_get()
48 struct dentry *dentry, const char *name, in ext4_xattr_user_set() argument
53 if (!test_opt(dentry->d_sb, XATTR_USER)) in ext4_xattr_user_set()
55 return ext4_xattr_set(d_inode(dentry), EXT4_XATTR_INDEX_USER, in ext4_xattr_user_set()
Dxattr_trusted.c17 struct dentry *dentry, char *list, size_t list_size, in ext4_xattr_trusted_list() argument
36 struct dentry *dentry, const char *name, void *buffer, in ext4_xattr_trusted_get() argument
41 return ext4_xattr_get(d_inode(dentry), EXT4_XATTR_INDEX_TRUSTED, in ext4_xattr_trusted_get()
47 struct dentry *dentry, const char *name, in ext4_xattr_trusted_set() argument
52 return ext4_xattr_set(d_inode(dentry), EXT4_XATTR_INDEX_TRUSTED, in ext4_xattr_trusted_set()
Dxattr_security.c16 struct dentry *dentry, char *list, size_t list_size, in ext4_xattr_security_list() argument
33 struct dentry *dentry, const char *name, in ext4_xattr_security_get() argument
38 return ext4_xattr_get(d_inode(dentry), EXT4_XATTR_INDEX_SECURITY, in ext4_xattr_security_get()
44 struct dentry *dentry, const char *name, in ext4_xattr_security_set() argument
49 return ext4_xattr_set(d_inode(dentry), EXT4_XATTR_INDEX_SECURITY, in ext4_xattr_security_set()
/linux-4.4.14/fs/logfs/
Ddir.c157 static struct page *logfs_get_dd_page(struct inode *dir, struct dentry *dentry) in logfs_get_dd_page() argument
159 struct qstr *name = &dentry->d_name; in logfs_get_dd_page()
213 static int logfs_unlink(struct inode *dir, struct dentry *dentry) in logfs_unlink() argument
216 struct inode *inode = d_inode(dentry); in logfs_unlink()
231 page = logfs_get_dd_page(dir, dentry); in logfs_unlink()
272 static int logfs_rmdir(struct inode *dir, struct dentry *dentry) in logfs_rmdir() argument
274 struct inode *inode = d_inode(dentry); in logfs_rmdir()
279 return logfs_unlink(dir, dentry); in logfs_rmdir()
332 static struct dentry *logfs_lookup(struct inode *dir, struct dentry *dentry, in logfs_lookup() argument
341 page = logfs_get_dd_page(dir, dentry); in logfs_lookup()
[all …]
/linux-4.4.14/security/tomoyo/
Drealpath.c100 struct inode *inode = d_backing_inode(path->dentry); in tomoyo_get_absolute_path()
121 static char *tomoyo_get_dentry_path(struct dentry *dentry, char * const buffer, in tomoyo_get_dentry_path() argument
126 pos = dentry_path_raw(dentry, buffer, buflen - 1); in tomoyo_get_dentry_path()
128 struct inode *inode = d_backing_inode(dentry); in tomoyo_get_dentry_path()
147 static char *tomoyo_get_local_path(struct dentry *dentry, char * const buffer, in tomoyo_get_local_path() argument
150 struct super_block *sb = dentry->d_sb; in tomoyo_get_local_path()
151 char *pos = tomoyo_get_dentry_path(dentry, buffer, buflen); in tomoyo_get_local_path()
222 struct inode *inode = d_backing_inode(path->dentry); in tomoyo_get_socket_name()
255 struct dentry *dentry = path->dentry; in tomoyo_realpath_from_path() local
257 if (!dentry) in tomoyo_realpath_from_path()
[all …]
Dtomoyo.c166 static int tomoyo_path_unlink(struct path *parent, struct dentry *dentry) in tomoyo_path_unlink() argument
168 struct path path = { parent->mnt, dentry }; in tomoyo_path_unlink()
181 static int tomoyo_path_mkdir(struct path *parent, struct dentry *dentry, in tomoyo_path_mkdir() argument
184 struct path path = { parent->mnt, dentry }; in tomoyo_path_mkdir()
197 static int tomoyo_path_rmdir(struct path *parent, struct dentry *dentry) in tomoyo_path_rmdir() argument
199 struct path path = { parent->mnt, dentry }; in tomoyo_path_rmdir()
212 static int tomoyo_path_symlink(struct path *parent, struct dentry *dentry, in tomoyo_path_symlink() argument
215 struct path path = { parent->mnt, dentry }; in tomoyo_path_symlink()
229 static int tomoyo_path_mknod(struct path *parent, struct dentry *dentry, in tomoyo_path_mknod() argument
232 struct path path = { parent->mnt, dentry }; in tomoyo_path_mknod()
[all …]
/linux-4.4.14/drivers/oprofile/
Doprofilefs.c135 static int __oprofilefs_create_file(struct dentry *root, char const *name, in __oprofilefs_create_file()
138 struct dentry *dentry; in __oprofilefs_create_file() local
142 dentry = d_alloc_name(root, name); in __oprofilefs_create_file()
143 if (!dentry) { in __oprofilefs_create_file()
149 dput(dentry); in __oprofilefs_create_file()
155 d_add(dentry, inode); in __oprofilefs_create_file()
161 int oprofilefs_create_ulong(struct dentry *root, in oprofilefs_create_ulong()
169 int oprofilefs_create_ro_ulong(struct dentry *root, in oprofilefs_create_ro_ulong()
191 int oprofilefs_create_ro_atomic(struct dentry *root, in oprofilefs_create_ro_atomic()
199 int oprofilefs_create_file(struct dentry *root, in oprofilefs_create_file()
[all …]
/linux-4.4.14/drivers/block/drbd/
Ddrbd_debugfs.c19 static struct dentry *drbd_debugfs_root;
20 static struct dentry *drbd_debugfs_version;
21 static struct dentry *drbd_debugfs_resources;
22 static struct dentry *drbd_debugfs_minors;
427 struct dentry *parent; in drbd_single_open()
432 parent = file->f_path.dentry->d_parent; in drbd_single_open()
439 if (simple_positive(file->f_path.dentry) in drbd_single_open()
476 struct dentry *dentry; in drbd_debugfs_resource_add() local
480 dentry = debugfs_create_dir(resource->name, drbd_debugfs_resources); in drbd_debugfs_resource_add()
481 if (IS_ERR_OR_NULL(dentry)) in drbd_debugfs_resource_add()
[all …]
/linux-4.4.14/fs/gfs2/
Ddentry.c36 static int gfs2_drevalidate(struct dentry *dentry, unsigned int flags) in gfs2_drevalidate() argument
38 struct dentry *parent; in gfs2_drevalidate()
50 parent = dget_parent(dentry); in gfs2_drevalidate()
53 inode = d_inode(dentry); in gfs2_drevalidate()
71 error = gfs2_dir_check(d_inode(parent), &dentry->d_name, ip); in gfs2_drevalidate()
106 static int gfs2_dhash(const struct dentry *dentry, struct qstr *str) in gfs2_dhash() argument
112 static int gfs2_dentry_delete(const struct dentry *dentry) in gfs2_dentry_delete() argument
116 if (d_really_is_negative(dentry)) in gfs2_dentry_delete()
119 ginode = GFS2_I(d_inode(dentry)); in gfs2_dentry_delete()
Dinode.c584 static int gfs2_create_inode(struct inode *dir, struct dentry *dentry, in gfs2_create_inode() argument
589 const struct qstr *name = &dentry->d_name; in gfs2_create_inode()
620 inode = gfs2_dir_search(dir, &dentry->d_name, !S_ISREG(mode) || excl); in gfs2_create_inode()
628 d_instantiate(dentry, inode); in gfs2_create_inode()
632 error = finish_open(file, dentry, gfs2_open_common, opened); in gfs2_create_inode()
759 d_instantiate(dentry, inode); in gfs2_create_inode()
762 error = finish_open(file, dentry, gfs2_open_common, opened); in gfs2_create_inode()
811 static int gfs2_create(struct inode *dir, struct dentry *dentry, in gfs2_create() argument
814 return gfs2_create_inode(dir, dentry, NULL, S_IFREG | mode, 0, NULL, 0, excl, NULL); in gfs2_create()
828 static struct dentry *__gfs2_lookup(struct inode *dir, struct dentry *dentry, in __gfs2_lookup() argument
[all …]
/linux-4.4.14/security/apparmor/
Dlsm.c176 struct dentry *dentry, u32 mask, in common_perm_dir_dentry() argument
179 struct path path = { dir->mnt, dentry }; in common_perm_dir_dentry()
194 struct dentry *dentry, u32 mask) in common_perm_mnt_dentry() argument
196 struct path path = { mnt, dentry }; in common_perm_mnt_dentry()
197 struct path_cond cond = { d_backing_inode(dentry)->i_uid, in common_perm_mnt_dentry()
198 d_backing_inode(dentry)->i_mode in common_perm_mnt_dentry()
214 struct dentry *dentry, u32 mask) in common_perm_rm() argument
216 struct inode *inode = d_backing_inode(dentry); in common_perm_rm()
219 if (!inode || !dir->mnt || !mediated_filesystem(dentry)) in common_perm_rm()
225 return common_perm_dir_dentry(op, dir, dentry, mask, &cond); in common_perm_rm()
[all …]
/linux-4.4.14/fs/jffs2/
Ddir.c27 static int jffs2_create (struct inode *,struct dentry *,umode_t,
29 static struct dentry *jffs2_lookup (struct inode *,struct dentry *,
31 static int jffs2_link (struct dentry *,struct inode *,struct dentry *);
32 static int jffs2_unlink (struct inode *,struct dentry *);
33 static int jffs2_symlink (struct inode *,struct dentry *,const char *);
34 static int jffs2_mkdir (struct inode *,struct dentry *,umode_t);
35 static int jffs2_rmdir (struct inode *,struct dentry *);
36 static int jffs2_mknod (struct inode *,struct dentry *,umode_t,dev_t);
37 static int jffs2_rename (struct inode *, struct dentry *,
38 struct inode *, struct dentry *);
[all …]
Dxattr_trusted.c20 struct dentry *dentry, const char *name, in jffs2_trusted_getxattr() argument
25 return do_jffs2_getxattr(d_inode(dentry), JFFS2_XPREFIX_TRUSTED, in jffs2_trusted_getxattr()
30 struct dentry *dentry, const char *name, in jffs2_trusted_setxattr() argument
35 return do_jffs2_setxattr(d_inode(dentry), JFFS2_XPREFIX_TRUSTED, in jffs2_trusted_setxattr()
40 struct dentry *dentry, char *list, in jffs2_trusted_listxattr() argument
Dxattr_user.c20 struct dentry *dentry, const char *name, in jffs2_user_getxattr() argument
25 return do_jffs2_getxattr(d_inode(dentry), JFFS2_XPREFIX_USER, in jffs2_user_getxattr()
30 struct dentry *dentry, const char *name, in jffs2_user_setxattr() argument
35 return do_jffs2_setxattr(d_inode(dentry), JFFS2_XPREFIX_USER, in jffs2_user_setxattr()
40 struct dentry *dentry, char *list, in jffs2_user_listxattr() argument
Dsecurity.c52 struct dentry *dentry, const char *name, in jffs2_security_getxattr() argument
58 return do_jffs2_getxattr(d_inode(dentry), JFFS2_XPREFIX_SECURITY, in jffs2_security_getxattr()
63 struct dentry *dentry, const char *name, in jffs2_security_setxattr() argument
69 return do_jffs2_setxattr(d_inode(dentry), JFFS2_XPREFIX_SECURITY, in jffs2_security_setxattr()
74 struct dentry *dentry, char *list, in jffs2_security_listxattr() argument
/linux-4.4.14/fs/fat/
Dnamei_vfat.c32 static int vfat_revalidate_shortname(struct dentry *dentry) in vfat_revalidate_shortname() argument
35 spin_lock(&dentry->d_lock); in vfat_revalidate_shortname()
36 if (dentry->d_time != d_inode(dentry->d_parent)->i_version) in vfat_revalidate_shortname()
38 spin_unlock(&dentry->d_lock); in vfat_revalidate_shortname()
42 static int vfat_revalidate(struct dentry *dentry, unsigned int flags) in vfat_revalidate() argument
48 if (d_really_is_positive(dentry)) in vfat_revalidate()
50 return vfat_revalidate_shortname(dentry); in vfat_revalidate()
53 static int vfat_revalidate_ci(struct dentry *dentry, unsigned int flags) in vfat_revalidate_ci() argument
68 if (d_really_is_positive(dentry)) in vfat_revalidate_ci()
86 return vfat_revalidate_shortname(dentry); in vfat_revalidate_ci()
[all …]
Dnamei_msdos.c149 static int msdos_hash(const struct dentry *dentry, struct qstr *qstr) in msdos_hash() argument
151 struct fat_mount_options *options = &MSDOS_SB(dentry->d_sb)->options; in msdos_hash()
165 static int msdos_cmp(const struct dentry *parent, const struct dentry *dentry, in msdos_cmp() argument
199 static struct dentry *msdos_lookup(struct inode *dir, struct dentry *dentry, in msdos_lookup() argument
208 err = msdos_find(dir, dentry->d_name.name, dentry->d_name.len, &sinfo); in msdos_lookup()
221 return d_splice_alias(inode, dentry); in msdos_lookup()
262 static int msdos_create(struct inode *dir, struct dentry *dentry, umode_t mode, in msdos_create() argument
274 err = msdos_format_name(dentry->d_name.name, dentry->d_name.len, in msdos_create()
278 is_hid = (dentry->d_name.name[0] == '.') && (msdos_name[0] != '.'); in msdos_create()
299 d_instantiate(dentry, inode); in msdos_create()
[all …]
/linux-4.4.14/fs/isofs/
Dnamei.c18 isofs_cmp(struct dentry *dentry, const char *compare, int dlen) in isofs_cmp() argument
23 if (likely(!dentry->d_op)) in isofs_cmp()
24 return dentry->d_name.len != dlen || memcmp(dentry->d_name.name, compare, dlen); in isofs_cmp()
25 return dentry->d_op->d_compare(NULL, NULL, dentry->d_name.len, dentry->d_name.name, &qstr); in isofs_cmp()
35 isofs_find_entry(struct inode *dir, struct dentry *dentry, in isofs_find_entry() argument
135 match = (isofs_cmp(dentry, dpnt, dlen) == 0); in isofs_find_entry()
151 struct dentry *isofs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) in isofs_lookup() argument
163 found = isofs_find_entry(dir, dentry, in isofs_lookup()
171 return d_splice_alias(inode, dentry); in isofs_lookup()
/linux-4.4.14/fs/omfs/
Ddir.c111 static int omfs_add_link(struct dentry *dentry, struct inode *inode) in omfs_add_link() argument
113 struct inode *dir = d_inode(dentry->d_parent); in omfs_add_link()
114 const char *name = dentry->d_name.name; in omfs_add_link()
115 int namelen = dentry->d_name.len; in omfs_add_link()
156 static int omfs_delete_entry(struct dentry *dentry) in omfs_delete_entry() argument
158 struct inode *dir = d_inode(dentry->d_parent); in omfs_delete_entry()
160 const char *name = dentry->d_name.name; in omfs_delete_entry()
161 int namelen = dentry->d_name.len; in omfs_delete_entry()
238 static int omfs_remove(struct inode *dir, struct dentry *dentry) in omfs_remove() argument
240 struct inode *inode = d_inode(dentry); in omfs_remove()
[all …]
/linux-4.4.14/fs/xfs/
Dxfs_iops.c100 struct dentry *dentry, in xfs_dentry_to_name() argument
103 namep->name = dentry->d_name.name; in xfs_dentry_to_name()
104 namep->len = dentry->d_name.len; in xfs_dentry_to_name()
112 struct dentry *dentry) in xfs_cleanup_inode() argument
121 xfs_dentry_to_name(&teardown, dentry, 0); in xfs_cleanup_inode()
129 struct dentry *dentry, in xfs_generic_create() argument
157 xfs_dentry_to_name(&name, dentry, mode); in xfs_generic_create()
160 error = xfs_create_tmpfile(XFS_I(dir), dentry, mode, &ip); in xfs_generic_create()
167 error = xfs_init_security(inode, dir, &dentry->d_name); in xfs_generic_create()
185 d_tmpfile(dentry, inode); in xfs_generic_create()
[all …]
Dxfs_xattr.c35 xfs_xattr_get(const struct xattr_handler *handler, struct dentry *dentry, in xfs_xattr_get() argument
39 struct xfs_inode *ip = XFS_I(d_inode(dentry)); in xfs_xattr_get()
80 xfs_xattr_set(const struct xattr_handler *handler, struct dentry *dentry, in xfs_xattr_set() argument
84 struct xfs_inode *ip = XFS_I(d_inode(dentry)); in xfs_xattr_set()
101 xfs_forget_acl(d_inode(dentry), name, xflags); in xfs_xattr_set()
225 xfs_vn_listxattr(struct dentry *dentry, char *data, size_t size) in xfs_vn_listxattr() argument
229 struct inode *inode = d_inode(dentry); in xfs_vn_listxattr()
Dxfs_ioctl32.c333 STATIC struct dentry *
350 struct dentry *dentry; in xfs_compat_attrlist_by_handle() local
368 dentry = xfs_compat_handlereq_to_dentry(parfilp, &al_hreq.hreq); in xfs_compat_attrlist_by_handle()
369 if (IS_ERR(dentry)) in xfs_compat_attrlist_by_handle()
370 return PTR_ERR(dentry); in xfs_compat_attrlist_by_handle()
378 error = xfs_attr_list(XFS_I(d_inode(dentry)), kbuf, al_hreq.buflen, in xfs_compat_attrlist_by_handle()
389 dput(dentry); in xfs_compat_attrlist_by_handle()
401 struct dentry *dentry; in xfs_compat_attrmulti_by_handle() local
415 dentry = xfs_compat_handlereq_to_dentry(parfilp, &am_hreq.hreq); in xfs_compat_attrmulti_by_handle()
416 if (IS_ERR(dentry)) in xfs_compat_attrmulti_by_handle()
[all …]
/linux-4.4.14/fs/hostfs/
Dhostfs_kern.c84 static char *__dentry_name(struct dentry *dentry, char *name) in __dentry_name() argument
86 char *p = dentry_path_raw(dentry, name, PATH_MAX); in __dentry_name()
90 root = dentry->d_sb->s_fs_info; in __dentry_name()
115 static char *dentry_name(struct dentry *dentry) in dentry_name() argument
121 return __dentry_name(dentry, name); in dentry_name()
126 struct dentry *dentry; in inode_name() local
129 dentry = d_find_alias(ino); in inode_name()
130 if (!dentry) in inode_name()
133 name = dentry_name(dentry); in inode_name()
135 dput(dentry); in inode_name()
[all …]
/linux-4.4.14/fs/efivarfs/
Dinode.c104 static int efivarfs_create(struct inode *dir, struct dentry *dentry, in efivarfs_create() argument
112 if (!efivarfs_valid_name(dentry->d_name.name, dentry->d_name.len)) in efivarfs_create()
120 namelen = dentry->d_name.len - EFI_VARIABLE_GUID_LEN - 1; in efivarfs_create()
122 efivarfs_hex_to_guid(dentry->d_name.name + namelen + 1, in efivarfs_create()
126 dentry->d_name.name, namelen)) in efivarfs_create()
136 var->var.VariableName[i] = dentry->d_name.name[i]; in efivarfs_create()
143 d_instantiate(dentry, inode); in efivarfs_create()
144 dget(dentry); in efivarfs_create()
154 static int efivarfs_unlink(struct inode *dir, struct dentry *dentry) in efivarfs_unlink() argument
156 struct efivar_entry *var = d_inode(dentry)->i_private; in efivarfs_unlink()
[all …]
Dsuper.c48 static int efivarfs_d_compare(const struct dentry *parent, in efivarfs_d_compare()
49 const struct dentry *dentry, in efivarfs_d_compare() argument
66 static int efivarfs_d_hash(const struct dentry *dentry, struct qstr *qstr) in efivarfs_d_hash() argument
92 static struct dentry *efivarfs_alloc_dentry(struct dentry *parent, char *name) in efivarfs_alloc_dentry()
94 struct dentry *d; in efivarfs_alloc_dentry()
118 struct dentry *dentry, *root = sb->s_root; in efivarfs_callback() local
155 dentry = efivarfs_alloc_dentry(root, name); in efivarfs_callback()
156 if (IS_ERR(dentry)) { in efivarfs_callback()
157 err = PTR_ERR(dentry); in efivarfs_callback()
171 d_add(dentry, inode); in efivarfs_callback()
[all …]
/linux-4.4.14/fs/hfs/
Ddir.c20 static struct dentry *hfs_lookup(struct inode *dir, struct dentry *dentry, in hfs_lookup() argument
31 hfs_cat_build_key(dir->i_sb, fd.search_key, dir->i_ino, &dentry->d_name); in hfs_lookup()
47 d_add(dentry, inode); in hfs_lookup()
192 static int hfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, in hfs_create() argument
198 inode = hfs_new_inode(dir, &dentry->d_name, mode); in hfs_create()
202 res = hfs_cat_create(inode->i_ino, dir, &dentry->d_name, inode); in hfs_create()
209 d_instantiate(dentry, inode); in hfs_create()
222 static int hfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) in hfs_mkdir() argument
227 inode = hfs_new_inode(dir, &dentry->d_name, S_IFDIR | mode); in hfs_mkdir()
231 res = hfs_cat_create(inode->i_ino, dir, &dentry->d_name, inode); in hfs_mkdir()
[all …]
Dattr.c16 int hfs_setxattr(struct dentry *dentry, const char *name, in hfs_setxattr() argument
19 struct inode *inode = d_inode(dentry); in hfs_setxattr()
59 ssize_t hfs_getxattr(struct dentry *dentry, const char *name, in hfs_getxattr() argument
62 struct inode *inode = d_inode(dentry); in hfs_getxattr()
106 ssize_t hfs_listxattr(struct dentry *dentry, char *buffer, size_t size) in hfs_listxattr() argument
108 struct inode *inode = d_inode(dentry); in hfs_listxattr()
Dhfs_fs.h206 extern int hfs_inode_setattr(struct dentry *, struct iattr *);
214 extern int hfs_setxattr(struct dentry *dentry, const char *name,
216 extern ssize_t hfs_getxattr(struct dentry *dentry, const char *name,
218 extern ssize_t hfs_listxattr(struct dentry *dentry, char *buffer, size_t size);
232 extern int hfs_hash_dentry(const struct dentry *, struct qstr *);
235 extern int hfs_compare_dentry(const struct dentry *parent, const struct dentry *dentry,
/linux-4.4.14/Documentation/filesystems/
Ddebugfs.txt28 struct dentry *debugfs_create_dir(const char *name, struct dentry *parent);
33 dentry pointer which can be used to create files in the directory (and to
41 struct dentry *debugfs_create_file(const char *name, umode_t mode,
42 struct dentry *parent, void *data,
51 the return value will be a dentry pointer to the created file, NULL for
57 struct dentry *debugfs_create_file_size(const char *name, umode_t mode,
58 struct dentry *parent, void *data,
70 struct dentry *debugfs_create_u8(const char *name, umode_t mode,
71 struct dentry *parent, u8 *value);
72 struct dentry *debugfs_create_u16(const char *name, umode_t mode,
[all …]
Dpath-lookup.txt4 Path resolution is the finding a dentry corresponding to a path name string, by
7 with the first component of the pathname (eg. root or cwd) with a known dentry,
8 then finding the child of that dentry, which is named the next component in the
9 path string. Then repeating the lookup from the child dentry and finding its
26 dentry that was looked up, so that may be used as the basis for walking the
28 because of the locks and atomic operations required for every dentry element
30 are path-walk intensive tend to do path lookups starting from a common dentry
44 the namespace. A path is represented as a (dentry, vfsmount) tuple. The name
88 Parent and name members of a dentry, as well as its membership in the dcache
89 hash, and its inode are protected by the per-dentry d_lock spinlock. A
[all …]
/linux-4.4.14/fs/f2fs/
Dnamei.c123 static int f2fs_create(struct inode *dir, struct dentry *dentry, umode_t mode, in f2fs_create() argument
138 set_cold_files(sbi, inode, dentry->d_name.name); in f2fs_create()
146 err = f2fs_add_link(dentry, inode); in f2fs_create()
153 d_instantiate(dentry, inode); in f2fs_create()
164 static int f2fs_link(struct dentry *old_dentry, struct inode *dir, in f2fs_link()
165 struct dentry *dentry) in f2fs_link() argument
182 err = f2fs_add_link(dentry, inode); in f2fs_link()
187 d_instantiate(dentry, inode); in f2fs_link()
199 struct dentry *f2fs_get_parent(struct dentry *child) in f2fs_get_parent()
246 static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry, in f2fs_lookup() argument
[all …]
Dxattr.c29 struct dentry *dentry, char *list, size_t list_size, in f2fs_xattr_generic_list() argument
32 struct f2fs_sb_info *sbi = F2FS_SB(dentry->d_sb); in f2fs_xattr_generic_list()
61 struct dentry *dentry, const char *name, void *buffer, in f2fs_xattr_generic_get() argument
64 struct f2fs_sb_info *sbi = F2FS_SB(dentry->d_sb); in f2fs_xattr_generic_get()
82 return f2fs_getxattr(d_inode(dentry), handler->flags, name, in f2fs_xattr_generic_get()
87 struct dentry *dentry, const char *name, const void *value, in f2fs_xattr_generic_set() argument
90 struct f2fs_sb_info *sbi = F2FS_SB(dentry->d_sb); in f2fs_xattr_generic_set()
109 return f2fs_setxattr(d_inode(dentry), handler->flags, name, in f2fs_xattr_generic_set()
114 struct dentry *dentry, char *list, size_t list_size, in f2fs_xattr_advise_list() argument
127 struct dentry *dentry, const char *name, void *buffer, in f2fs_xattr_advise_get() argument
[all …]
/linux-4.4.14/fs/ubifs/
Ddir.c184 static struct dentry *ubifs_lookup(struct inode *dir, struct dentry *dentry, in ubifs_lookup() argument
193 dbg_gen("'%pd' in dir ino %lu", dentry, dir->i_ino); in ubifs_lookup()
195 if (dentry->d_name.len > UBIFS_MAX_NLEN) in ubifs_lookup()
202 dent_key_init(c, &key, dir->i_ino, &dentry->d_name); in ubifs_lookup()
204 err = ubifs_tnc_lookup_nm(c, &key, dent, &dentry->d_name); in ubifs_lookup()
213 if (dbg_check_name(c, dent, &dentry->d_name)) { in ubifs_lookup()
226 dentry, err); in ubifs_lookup()
237 d_add(dentry, inode); in ubifs_lookup()
245 static int ubifs_create(struct inode *dir, struct dentry *dentry, umode_t mode, in ubifs_create() argument
250 int err, sz_change = CALC_DENT_SIZE(dentry->d_name.len); in ubifs_create()
[all …]
/linux-4.4.14/fs/efs/
Dnamei.c64 struct dentry *efs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) in efs_lookup() argument
69 inodenum = efs_find_entry(dir, dentry->d_name.name, dentry->d_name.len); in efs_lookup()
73 return d_splice_alias(inode, dentry); in efs_lookup()
95 struct dentry *efs_fh_to_dentry(struct super_block *sb, struct fid *fid, in efs_fh_to_dentry()
102 struct dentry *efs_fh_to_parent(struct super_block *sb, struct fid *fid, in efs_fh_to_parent()
109 struct dentry *efs_get_parent(struct dentry *child) in efs_get_parent()
111 struct dentry *parent = ERR_PTR(-ENOENT); in efs_get_parent()
/linux-4.4.14/Documentation/filesystems/nfs/
DExporting8 All filesystem operations require a dentry (or two) as a starting
13 different way to refer to a particular dentry. As the alternative
20 string for any dentry, and how to find an appropriate dentry for any
48 to already have a (non-connected) dentry, and must be able to move
49 that dentry into place (based on the parent and name in the
51 it is a dcache invariant that directories only have one dentry.
55 a/ A dentry flag DCACHE_DISCONNECTED which is set on
56 any dentry that might not be part of the proper prefix.
58 dentry is noticed to be a child of a dentry which is in the proper
69 d_obtain_alias(inode) will return a dentry for the given inode.
[all …]
/linux-4.4.14/fs/devpts/
Dinode.c131 struct dentry *ptmx_dentry;
245 struct dentry *dentry; in mknod_ptmx() local
247 struct dentry *root = sb->s_root; in mknod_ptmx()
266 dentry = d_alloc_name(root, "ptmx"); in mknod_ptmx()
267 if (!dentry) { in mknod_ptmx()
278 dput(dentry); in mknod_ptmx()
290 d_add(dentry, inode); in mknod_ptmx()
292 fsi->ptmx_dentry = dentry; in mknod_ptmx()
334 static int devpts_show_options(struct seq_file *seq, struct dentry *root) in devpts_show_options()
446 static struct dentry *devpts_mount(struct file_system_type *fs_type, in devpts_mount()
[all …]
/linux-4.4.14/fs/ramfs/
Dinode.c93 ramfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) in ramfs_mknod() argument
99 d_instantiate(dentry, inode); in ramfs_mknod()
100 dget(dentry); /* Extra count - pin the dentry in core */ in ramfs_mknod()
107 static int ramfs_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode) in ramfs_mkdir() argument
109 int retval = ramfs_mknod(dir, dentry, mode | S_IFDIR, 0); in ramfs_mkdir()
115 static int ramfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl) in ramfs_create() argument
117 return ramfs_mknod(dir, dentry, mode | S_IFREG, 0); in ramfs_create()
120 static int ramfs_symlink(struct inode * dir, struct dentry *dentry, const char * symname) in ramfs_symlink() argument
130 d_instantiate(dentry, inode); in ramfs_symlink()
131 dget(dentry); in ramfs_symlink()
[all …]
/linux-4.4.14/fs/jfs/
Dnamei.c75 static int jfs_create(struct inode *dip, struct dentry *dentry, umode_t mode, in jfs_create() argument
87 jfs_info("jfs_create: dip:0x%p name:%pd", dip, dentry); in jfs_create()
97 if ((rc = get_UCSname(&dname, dentry))) in jfs_create()
120 rc = jfs_init_security(tid, ip, dip, &dentry->d_name); in jfs_create()
182 d_instantiate(dentry, ip); in jfs_create()
210 static int jfs_mkdir(struct inode *dip, struct dentry *dentry, umode_t mode) in jfs_mkdir() argument
221 jfs_info("jfs_mkdir: dip:0x%p name:%pd", dip, dentry); in jfs_mkdir()
231 if ((rc = get_UCSname(&dname, dentry))) in jfs_mkdir()
254 rc = jfs_init_security(tid, ip, dip, &dentry->d_name); in jfs_mkdir()
317 d_instantiate(dentry, ip); in jfs_mkdir()
[all …]
Djfs_inode.h35 extern struct dentry *jfs_get_parent(struct dentry *dentry);
37 extern struct dentry *jfs_fh_to_dentry(struct super_block *sb, struct fid *fid,
39 extern struct dentry *jfs_fh_to_parent(struct super_block *sb, struct fid *fid,
43 extern int jfs_setattr(struct dentry *, struct iattr *);
/linux-4.4.14/fs/squashfs/
Dexport.c74 static struct dentry *squashfs_export_iget(struct super_block *sb, in squashfs_export_iget()
78 struct dentry *dentry = ERR_PTR(-ENOENT); in squashfs_export_iget() local
84 dentry = d_obtain_alias(squashfs_iget(sb, ino, ino_num)); in squashfs_export_iget()
86 return dentry; in squashfs_export_iget()
90 static struct dentry *squashfs_fh_to_dentry(struct super_block *sb, in squashfs_fh_to_dentry()
101 static struct dentry *squashfs_fh_to_parent(struct super_block *sb, in squashfs_fh_to_parent()
111 static struct dentry *squashfs_get_parent(struct dentry *child) in squashfs_get_parent()
/linux-4.4.14/fs/btrfs/
Dxattr.h31 extern ssize_t btrfs_getxattr(struct dentry *dentry, const char *name,
33 extern int btrfs_setxattr(struct dentry *dentry, const char *name,
35 extern int btrfs_removexattr(struct dentry *dentry, const char *name);
Dxattr.c261 ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size) in btrfs_listxattr() argument
264 struct inode *inode = d_inode(dentry); in btrfs_listxattr()
400 ssize_t btrfs_getxattr(struct dentry *dentry, const char *name, in btrfs_getxattr() argument
411 return generic_getxattr(dentry, name, buffer, size); in btrfs_getxattr()
416 return __btrfs_getxattr(d_inode(dentry), name, buffer, size); in btrfs_getxattr()
419 int btrfs_setxattr(struct dentry *dentry, const char *name, const void *value, in btrfs_setxattr() argument
422 struct btrfs_root *root = BTRFS_I(d_inode(dentry))->root; in btrfs_setxattr()
438 return generic_setxattr(dentry, name, value, size, flags); in btrfs_setxattr()
445 return btrfs_set_prop(d_inode(dentry), name, in btrfs_setxattr()
451 return __btrfs_setxattr(NULL, d_inode(dentry), name, value, size, in btrfs_setxattr()
[all …]
/linux-4.4.14/security/selinux/
Dselinuxfs.c66 static struct dentry *bool_dir;
72 static struct dentry *class_dir;
78 static struct dentry *policycap_dir;
349 static struct dentry *sel_make_dir(struct dentry *dir, const char *name,
1048 const char *name = filep->f_path.dentry->d_name.name; in sel_read_bool()
1082 const char *name = filep->f_path.dentry->d_name.name; in sel_write_bool()
1188 static void sel_remove_entries(struct dentry *de) in sel_remove_entries()
1200 struct dentry *dentry = NULL; in sel_make_bools() local
1201 struct dentry *dir = bool_dir; in sel_make_bools()
1231 dentry = d_alloc_name(dir, names[i]); in sel_make_bools()
[all …]
/linux-4.4.14/fs/qnx6/
Dnamei.c15 struct dentry *qnx6_lookup(struct inode *dir, struct dentry *dentry, in qnx6_lookup() argument
21 const char *name = dentry->d_name.name; in qnx6_lookup()
22 int len = dentry->d_name.len; in qnx6_lookup()
40 d_add(dentry, foundinode); in qnx6_lookup()
/linux-4.4.14/lib/
Dnotifier-error-inject.c20 static struct dentry *debugfs_create_errno(const char *name, umode_t mode, in debugfs_create_errno()
21 struct dentry *parent, int *value) in debugfs_create_errno()
46 struct dentry *notifier_err_inject_dir;
49 struct dentry *notifier_err_inject_init(const char *name, struct dentry *parent, in notifier_err_inject_init()
54 struct dentry *dir; in notifier_err_inject_init()
55 struct dentry *actions_dir; in notifier_err_inject_init()
69 struct dentry *action_dir; in notifier_err_inject_init()
/linux-4.4.14/fs/ocfs2/dlmfs/
Ddlmfs.c208 static int dlmfs_file_setattr(struct dentry *dentry, struct iattr *attr) in dlmfs_file_setattr() argument
211 struct inode *inode = d_inode(dentry); in dlmfs_file_setattr()
412 struct dentry *dentry, in dlmfs_get_inode() argument
441 user_dlm_lock_res_init(&ip->ip_lockres, dentry); in dlmfs_get_inode()
467 struct dentry * dentry, in dlmfs_mkdir() argument
472 struct qstr *domain = &dentry->d_name; in dlmfs_mkdir()
485 inode = dlmfs_get_inode(dir, dentry, mode | S_IFDIR); in dlmfs_mkdir()
504 d_instantiate(dentry, inode); in dlmfs_mkdir()
505 dget(dentry); /* Extra count - pin the dentry in core */ in dlmfs_mkdir()
515 struct dentry *dentry, in dlmfs_create() argument
[all …]
/linux-4.4.14/fs/bfs/
Ddir.c78 static int bfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, in bfs_create() argument
113 err = bfs_add_entry(dir, dentry->d_name.name, dentry->d_name.len, in bfs_create()
122 d_instantiate(dentry, inode); in bfs_create()
126 static struct dentry *bfs_lookup(struct inode *dir, struct dentry *dentry, in bfs_lookup() argument
134 if (dentry->d_name.len > BFS_NAMELEN) in bfs_lookup()
138 bh = bfs_find_entry(dir, dentry->d_name.name, dentry->d_name.len, &de); in bfs_lookup()
149 d_add(dentry, inode); in bfs_lookup()
153 static int bfs_link(struct dentry *old, struct inode *dir, in bfs_link()
154 struct dentry *new) in bfs_link()
176 static int bfs_unlink(struct inode *dir, struct dentry *dentry) in bfs_unlink() argument
[all …]
/linux-4.4.14/fs/notify/
Dfsnotify.c53 struct dentry *alias; in __fsnotify_update_child_dentry_flags()
66 struct dentry *child; in __fsnotify_update_child_dentry_flags()
89 int __fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask) in __fsnotify_parent() argument
91 struct dentry *parent; in __fsnotify_parent()
95 if (!dentry) in __fsnotify_parent()
96 dentry = path->dentry; in __fsnotify_parent()
98 if (!(dentry->d_flags & DCACHE_FSNOTIFY_PARENT_WATCHED)) in __fsnotify_parent()
101 parent = dget_parent(dentry); in __fsnotify_parent()
113 dentry->d_name.name, 0); in __fsnotify_parent()
115 ret = fsnotify(p_inode, mask, dentry->d_inode, FSNOTIFY_EVENT_INODE, in __fsnotify_parent()
[all …]
/linux-4.4.14/drivers/staging/rdma/ipath/
Dipath_fs.c48 static int ipathfs_mknod(struct inode *dir, struct dentry *dentry, in ipathfs_mknod() argument
72 d_instantiate(dentry, inode); in ipathfs_mknod()
80 struct dentry *parent, struct dentry **dentry, in create_file() argument
86 *dentry = lookup_one_len(name, parent, strlen(name)); in create_file()
87 if (!IS_ERR(*dentry)) in create_file()
88 error = ipathfs_mknod(d_inode(parent), *dentry, in create_file()
91 error = PTR_ERR(*dentry); in create_file()
228 struct dentry *dir, *tmp; in create_device_files()
260 static int remove_file(struct dentry *parent, char *name) in remove_file()
262 struct dentry *tmp; in remove_file()
[all …]
/linux-4.4.14/fs/fuse/
Dcontrol.c199 static struct dentry *fuse_ctl_add_dentry(struct dentry *parent, in fuse_ctl_add_dentry()
206 struct dentry *dentry; in fuse_ctl_add_dentry() local
210 dentry = d_alloc_name(parent, name); in fuse_ctl_add_dentry()
211 if (!dentry) in fuse_ctl_add_dentry()
214 fc->ctl_dentry[fc->ctl_ndents++] = dentry; in fuse_ctl_add_dentry()
230 d_add(dentry, inode); in fuse_ctl_add_dentry()
231 return dentry; in fuse_ctl_add_dentry()
240 struct dentry *parent; in fuse_ctl_add_conn()
285 struct dentry *dentry = fc->ctl_dentry[i]; in fuse_ctl_remove_conn() local
286 d_inode(dentry)->i_private = NULL; in fuse_ctl_remove_conn()
[all …]
/linux-4.4.14/fs/hpfs/
Ddentry.c15 static int hpfs_hash_dentry(const struct dentry *dentry, struct qstr *qstr) in hpfs_hash_dentry() argument
31 hash = partial_name_hash(hpfs_upcase(hpfs_sb(dentry->d_sb)->sb_cp_table,qstr->name[i]), hash); in hpfs_hash_dentry()
37 static int hpfs_compare_dentry(const struct dentry *parent, const struct dentry *dentry, in hpfs_compare_dentry() argument
Dnamei.c22 static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) in hpfs_mkdir() argument
24 const unsigned char *name = dentry->d_name.name; in hpfs_mkdir()
25 unsigned len = dentry->d_name.len; in hpfs_mkdir()
114 d_instantiate(dentry, result); in hpfs_mkdir()
130 static int hpfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl) in hpfs_create() argument
132 const unsigned char *name = dentry->d_name.name; in hpfs_create()
133 unsigned len = dentry->d_name.len; in hpfs_create()
203 d_instantiate(dentry, result); in hpfs_create()
217 static int hpfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev) in hpfs_mknod() argument
219 const unsigned char *name = dentry->d_name.name; in hpfs_mknod()
[all …]
/linux-4.4.14/drivers/crypto/caam/
Dintern.h104 struct dentry *dfs_root;
105 struct dentry *ctl; /* controller dir */
106 struct dentry *ctl_rq_dequeued, *ctl_ob_enc_req, *ctl_ib_dec_req;
107 struct dentry *ctl_ob_enc_bytes, *ctl_ob_prot_bytes;
108 struct dentry *ctl_ib_dec_bytes, *ctl_ib_valid_bytes;
109 struct dentry *ctl_faultaddr, *ctl_faultdetail, *ctl_faultstatus;
112 struct dentry *ctl_kek, *ctl_tkek, *ctl_tdsk;
/linux-4.4.14/drivers/misc/ibmasm/
Dibmasmfs.c94 static struct dentry *ibmasmfs_mount(struct file_system_type *fst, in ibmasmfs_mount()
152 static struct dentry *ibmasmfs_create_file(struct dentry *parent, in ibmasmfs_create_file()
158 struct dentry *dentry; in ibmasmfs_create_file() local
161 dentry = d_alloc_name(parent, name); in ibmasmfs_create_file()
162 if (!dentry) in ibmasmfs_create_file()
167 dput(dentry); in ibmasmfs_create_file()
174 d_add(dentry, inode); in ibmasmfs_create_file()
175 return dentry; in ibmasmfs_create_file()
178 static struct dentry *ibmasmfs_create_dir(struct dentry *parent, in ibmasmfs_create_dir()
181 struct dentry *dentry; in ibmasmfs_create_dir() local
[all …]
/linux-4.4.14/fs/udf/
Dnamei.c286 static struct dentry *udf_lookup(struct inode *dir, struct dentry *dentry, in udf_lookup() argument
294 if (dentry->d_name.len > UDF_NAME_LEN - 2) in udf_lookup()
299 if (!strncmp(dentry->d_name.name, ".B=", 3)) { in udf_lookup()
303 simple_strtoul(dentry->d_name.name + 3, in udf_lookup()
312 fi = udf_find_entry(dir, &dentry->d_name, &fibh, &cfi); in udf_lookup()
329 return d_splice_alias(inode, dentry); in udf_lookup()
333 struct dentry *dentry, in udf_add_entry() argument
360 if (dentry) { in udf_add_entry()
361 if (!dentry->d_name.len) { in udf_add_entry()
365 namelen = udf_put_filename(sb, dentry->d_name.name, name, in udf_add_entry()
[all …]
/linux-4.4.14/drivers/scsi/lpfc/
Dlpfc.h434 struct dentry *debug_disc_trc;
435 struct dentry *debug_nodelist;
436 struct dentry *vport_debugfs_root;
895 struct dentry *hba_debugfs_root;
897 struct dentry *debug_hbqinfo;
898 struct dentry *debug_dumpHostSlim;
899 struct dentry *debug_dumpHBASlim;
900 struct dentry *debug_dumpData; /* BlockGuard BPL */
901 struct dentry *debug_dumpDif; /* BlockGuard BPL */
902 struct dentry *debug_InjErrLBA; /* LBA to inject errors at */
[all …]

1234567