Lines Matching refs:dentry
112 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()
171 __d_drop(dentry); in spufs_prune_dir()
172 spin_unlock(&dentry->d_lock); in spufs_prune_dir()
173 simple_unlink(d_inode(dir), dentry); in spufs_prune_dir()
177 dput(dentry); in spufs_prune_dir()
179 spin_unlock(&dentry->d_lock); in spufs_prune_dir()
187 static int spufs_rmdir(struct inode *parent, struct dentry *dir) in spufs_rmdir()
199 static int spufs_fill_dir(struct dentry *dir, in spufs_fill_dir()
205 struct dentry *dentry = d_alloc_name(dir, files->name); in spufs_fill_dir() local
206 if (!dentry) in spufs_fill_dir()
208 ret = spufs_new_file(dir->d_sb, dentry, files->ops, in spufs_fill_dir()
221 struct dentry *dir; in spufs_dir_close()
224 dir = file->f_path.dentry; in spufs_dir_close()
247 spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags, in spufs_mkdir() argument
275 dget(dentry); in spufs_mkdir()
279 d_instantiate(dentry, inode); in spufs_mkdir()
282 ret = spufs_fill_dir(dentry, spufs_dir_nosched_contents, in spufs_mkdir()
285 ret = spufs_fill_dir(dentry, spufs_dir_contents, mode, ctx); in spufs_mkdir()
288 ret = spufs_fill_dir(dentry, spufs_dir_debug_contents, in spufs_mkdir()
292 spufs_rmdir(dir, dentry); in spufs_mkdir()
422 spufs_create_context(struct inode *inode, struct dentry *dentry, in spufs_create_context() argument
430 struct path path = {.mnt = mnt, .dentry = dentry}; in spufs_create_context()
458 ret = spufs_mkdir(inode, dentry, flags, mode & S_IRWXUGO); in spufs_create_context()
463 spufs_set_affinity(flags, SPUFS_I(d_inode(dentry))->i_ctx, in spufs_create_context()
471 WARN_ON(spufs_rmdir(inode, dentry)); in spufs_create_context()
480 spufs_mkgang(struct inode *dir, struct dentry *dentry, umode_t mode) in spufs_mkgang() argument
507 d_instantiate(dentry, inode); in spufs_mkgang()
509 inc_nlink(d_inode(dentry)); in spufs_mkgang()
543 struct dentry *dentry, in spufs_create_gang() argument
546 struct path path = {.mnt = mnt, .dentry = dentry}; in spufs_create_gang()
549 ret = spufs_mkgang(inode, dentry, mode & S_IRWXUGO); in spufs_create_gang()
553 int err = simple_rmdir(inode, dentry); in spufs_create_gang()
563 long spufs_create(struct path *path, struct dentry *dentry, in spufs_create() argument
566 struct inode *dir = d_inode(path->dentry); in spufs_create()
570 if (path->dentry->d_sb->s_type != &spufs_type) in spufs_create()
578 if (path->dentry != path->dentry->d_sb->s_root) in spufs_create()
585 ret = spufs_create_gang(dir, dentry, path->mnt, mode); in spufs_create()
587 ret = spufs_create_context(dir, dentry, path->mnt, flags, mode, in spufs_create()
590 fsnotify_mkdir(dir, dentry); in spufs_create()
746 static struct dentry *