24 #include <linux/module.h>
25 #include <linux/errno.h>
27 #include <linux/slab.h>
28 #include <linux/sched.h>
62 spin_lock(&dent->
lock);
64 spin_unlock(&dent->
lock);
83 dentry->
d_name.name, dentry, uid, any);
87 spin_lock(&dent->
lock);
89 if (any || fid->
uid == uid) {
94 spin_unlock(&dent->
lock);
106 struct dentry *dentry,
char ***names)
119 for (ds = dentry,
i = (n-1);
i >= 0;
i--, ds = ds->
d_parent)
120 wnames[
i] = (
char *)ds->d_name.name;
128 static struct p9_fid *v9fs_fid_lookup_with_uid(
struct dentry *dentry,
132 char **wnames, *uname;
137 v9ses = v9fs_dentry2v9ses(dentry);
139 fid = v9fs_fid_find(dentry, uid, any);
149 fid = v9fs_fid_find(ds, uid, any);
158 fid = v9fs_fid_find(dentry->
d_sb->s_root, uid, any);
162 return ERR_PTR(-
EPERM);
164 if (v9fs_proto_dotu(v9ses) || v9fs_proto_dotl(v9ses))
167 uname = v9ses->
uname;
177 if (dentry->
d_sb->s_root == dentry)
185 n = build_path_from_dentry(v9ses, dentry, &wnames);
240 v9ses = v9fs_dentry2v9ses(dentry);
260 return v9fs_fid_lookup_with_uid(dentry, uid, any);
275 static struct p9_fid *v9fs_fid_clone_with_uid(
struct dentry *dentry,
uid_t uid)
279 fid = v9fs_fid_lookup_with_uid(dentry, uid, 0);
292 fid = v9fs_fid_clone_with_uid(dentry, 0);