Lines Matching defs:subdir
89 struct dentry *subdir;
101 subdir = lookup_one_len(dirname, dir, strlen(dirname));
103 subdir = ERR_PTR(ret);
104 trace_cachefiles_lookup(NULL, dir, subdir);
105 if (IS_ERR(subdir)) {
107 PTR_ERR(subdir),
109 if (PTR_ERR(subdir) == -ENOMEM)
114 _debug("subdir -> %pd %s",
115 subdir, d_backing_inode(subdir) ? "positive" : "negative");
117 /* we need to create the subdir if it doesn't exist yet */
118 if (d_is_negative(subdir)) {
128 ret = security_path_mkdir(&path, subdir, 0700);
133 ret = vfs_mkdir(&nop_mnt_idmap, d_inode(dir), subdir, 0700);
139 trace_cachefiles_mkdir(dir, subdir);
141 if (unlikely(d_unhashed(subdir))) {
142 cachefiles_put_directory(subdir);
145 ASSERT(d_backing_inode(subdir));
148 subdir, d_backing_inode(subdir)->i_ino);
153 /* Tell rmdir() it's not allowed to delete the subdir */
154 inode_lock(d_inode(subdir));
157 if (!__cachefiles_mark_inode_in_use(NULL, d_inode(subdir))) {
159 subdir, d_inode(subdir)->i_ino);
163 inode_unlock(d_inode(subdir));
165 /* we need to make sure the subdir is a directory */
166 ASSERT(d_backing_inode(subdir));
168 if (!d_can_lookup(subdir)) {
175 if (!(d_backing_inode(subdir)->i_opflags & IOP_XATTR) ||
176 !d_backing_inode(subdir)->i_op->lookup ||
177 !d_backing_inode(subdir)->i_op->mkdir ||
178 !d_backing_inode(subdir)->i_op->rename ||
179 !d_backing_inode(subdir)->i_op->rmdir ||
180 !d_backing_inode(subdir)->i_op->unlink)
183 _leave(" = [%lu]", d_backing_inode(subdir)->i_ino);
184 return subdir;
187 cachefiles_put_directory(subdir);
192 inode_unlock(d_inode(subdir));
193 dput(subdir);
198 dput(subdir);
204 ret = PTR_ERR(subdir);