Lines Matching defs:subdir
973 * get_subdir - find or create a subdir with the specified name.
988 struct ctl_dir *subdir, *new = NULL;
992 subdir = find_subdir(dir, name, namelen);
993 if (!IS_ERR(subdir))
995 if (PTR_ERR(subdir) != -ENOENT)
1001 subdir = ERR_PTR(-ENOMEM);
1005 /* Was the subdir added while we dropped the lock? */
1006 subdir = find_subdir(dir, name, namelen);
1007 if (!IS_ERR(subdir))
1009 if (PTR_ERR(subdir) != -ENOENT)
1014 subdir = ERR_PTR(err);
1017 subdir = new;
1019 subdir->header.nreg++;
1021 if (IS_ERR(subdir)) {
1025 namelen, namelen, name, PTR_ERR(subdir));
1031 return subdir;