Lines Matching refs:dentry
22 static inline void __add_fid(struct dentry *dentry, struct p9_fid *fid) in __add_fid() argument
24 hlist_add_head(&fid->dlist, (struct hlist_head *)&dentry->d_fsdata); in __add_fid()
34 void v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid) in v9fs_fid_add() argument
36 spin_lock(&dentry->d_lock); in v9fs_fid_add()
37 __add_fid(dentry, fid); in v9fs_fid_add()
38 spin_unlock(&dentry->d_lock); in v9fs_fid_add()
91 static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any) in v9fs_fid_find() argument
96 dentry, dentry, from_kuid(&init_user_ns, uid), in v9fs_fid_find()
100 if (d_inode(dentry)) in v9fs_fid_find()
101 ret = v9fs_fid_find_inode(d_inode(dentry), uid); in v9fs_fid_find()
104 if (!ret && dentry->d_fsdata) { in v9fs_fid_find()
105 struct hlist_head *h = (struct hlist_head *)&dentry->d_fsdata; in v9fs_fid_find()
107 spin_lock(&dentry->d_lock); in v9fs_fid_find()
115 spin_unlock(&dentry->d_lock); in v9fs_fid_find()
127 struct dentry *dentry, const unsigned char ***names) in build_path_from_dentry() argument
131 struct dentry *ds; in build_path_from_dentry()
133 for (ds = dentry; !IS_ROOT(ds); ds = ds->d_parent) in build_path_from_dentry()
140 for (ds = dentry, i = (n-1); i >= 0; i--, ds = ds->d_parent) in build_path_from_dentry()
149 static struct p9_fid *v9fs_fid_lookup_with_uid(struct dentry *dentry, in v9fs_fid_lookup_with_uid() argument
152 struct dentry *ds; in v9fs_fid_lookup_with_uid()
158 v9ses = v9fs_dentry2v9ses(dentry); in v9fs_fid_lookup_with_uid()
160 fid = v9fs_fid_find(dentry, uid, any); in v9fs_fid_lookup_with_uid()
169 ds = dentry->d_parent; in v9fs_fid_lookup_with_uid()
175 fid = p9_client_walk(ofid, 1, &dentry->d_name.name, 1); in v9fs_fid_lookup_with_uid()
182 fid = v9fs_fid_find(dentry->d_sb->s_root, uid, any); in v9fs_fid_lookup_with_uid()
198 v9fs_fid_add(dentry->d_sb->s_root, fid); in v9fs_fid_lookup_with_uid()
201 if (dentry->d_sb->s_root == dentry) { in v9fs_fid_lookup_with_uid()
211 n = build_path_from_dentry(v9ses, dentry, &wnames); in v9fs_fid_lookup_with_uid()
244 spin_lock(&dentry->d_lock); in v9fs_fid_lookup_with_uid()
245 if (d_unhashed(dentry)) { in v9fs_fid_lookup_with_uid()
246 spin_unlock(&dentry->d_lock); in v9fs_fid_lookup_with_uid()
250 __add_fid(dentry, fid); in v9fs_fid_lookup_with_uid()
252 spin_unlock(&dentry->d_lock); in v9fs_fid_lookup_with_uid()
270 struct p9_fid *v9fs_fid_lookup(struct dentry *dentry) in v9fs_fid_lookup() argument
276 v9ses = v9fs_dentry2v9ses(dentry); in v9fs_fid_lookup()
296 return v9fs_fid_lookup_with_uid(dentry, uid, any); in v9fs_fid_lookup()
299 struct p9_fid *v9fs_writeback_fid(struct dentry *dentry) in v9fs_writeback_fid() argument
304 ofid = v9fs_fid_lookup_with_uid(dentry, GLOBAL_ROOT_UID, 0); in v9fs_writeback_fid()