Lines Matching refs:dentry
61 static struct dentry *public_dev_mount(struct file_system_type *fs_type, int flags, in public_dev_mount()
166 struct dentry *dentry; in dev_mkdir() local
170 dentry = kern_path_create(AT_FDCWD, name, &path, LOOKUP_DIRECTORY); in dev_mkdir()
171 if (IS_ERR(dentry)) in dev_mkdir()
172 return PTR_ERR(dentry); in dev_mkdir()
174 err = vfs_mkdir(d_inode(path.dentry), dentry, mode); in dev_mkdir()
177 d_inode(dentry)->i_private = &thread; in dev_mkdir()
178 done_path_create(&path, dentry); in dev_mkdir()
212 struct dentry *dentry; in handle_create() local
216 dentry = kern_path_create(AT_FDCWD, nodename, &path, 0); in handle_create()
217 if (dentry == ERR_PTR(-ENOENT)) { in handle_create()
219 dentry = kern_path_create(AT_FDCWD, nodename, &path, 0); in handle_create()
221 if (IS_ERR(dentry)) in handle_create()
222 return PTR_ERR(dentry); in handle_create()
224 err = vfs_mknod(d_inode(path.dentry), dentry, mode, dev->devt); in handle_create()
232 inode_lock(d_inode(dentry)); in handle_create()
233 notify_change(dentry, &newattrs, NULL); in handle_create()
234 inode_unlock(d_inode(dentry)); in handle_create()
237 d_inode(dentry)->i_private = &thread; in handle_create()
239 done_path_create(&path, dentry); in handle_create()
246 struct dentry *dentry; in dev_rmdir() local
249 dentry = kern_path_locked(name, &parent); in dev_rmdir()
250 if (IS_ERR(dentry)) in dev_rmdir()
251 return PTR_ERR(dentry); in dev_rmdir()
252 if (d_really_is_positive(dentry)) { in dev_rmdir()
253 if (d_inode(dentry)->i_private == &thread) in dev_rmdir()
254 err = vfs_rmdir(d_inode(parent.dentry), dentry); in dev_rmdir()
260 dput(dentry); in dev_rmdir()
261 inode_unlock(d_inode(parent.dentry)); in dev_rmdir()
315 struct dentry *dentry; in handle_remove() local
319 dentry = kern_path_locked(nodename, &parent); in handle_remove()
320 if (IS_ERR(dentry)) in handle_remove()
321 return PTR_ERR(dentry); in handle_remove()
323 if (d_really_is_positive(dentry)) { in handle_remove()
325 struct path p = {.mnt = parent.mnt, .dentry = dentry}; in handle_remove()
328 if (!err && dev_mynode(dev, d_inode(dentry), &stat)) { in handle_remove()
339 inode_lock(d_inode(dentry)); in handle_remove()
340 notify_change(dentry, &newattrs, NULL); in handle_remove()
341 inode_unlock(d_inode(dentry)); in handle_remove()
342 err = vfs_unlink(d_inode(parent.dentry), dentry, NULL); in handle_remove()
349 dput(dentry); in handle_remove()
350 inode_unlock(d_inode(parent.dentry)); in handle_remove()