Lines Matching defs:fid
34 #include "fid.h"
37 * v9fs_fid_insert - add a fid to a dentry
38 * @fid: fid to add
43 int v9fs_fid_insert(struct v9fs_fid *fid, struct dentry *dentry)
46 dprintk(DEBUG_9P, "fid %d (%p) dentry %s (%p)\n", fid->fid, fid,
59 fid->uid = current->uid;
60 list_add(&fid->list, fid_list);
66 * @dentry - dentry to link newly created fid to
70 struct v9fs_fid *v9fs_fid_create(struct v9fs_session_info *v9ses, int fid)
74 dprintk(DEBUG_9P, "fid create fid %d\n", fid);
81 new->fid = fid;
96 * @fid: fid to destroy
100 void v9fs_fid_destroy(struct v9fs_fid *fid)
102 list_del(&fid->list);
103 kfree(fid);
107 * v9fs_fid_lookup - return a locked fid from a dentry
108 * @dentry: dentry to look for fid in
110 * find a fid in the dentry, obtain its semaphore and return a reference to it.
128 dprintk(DEBUG_ERROR, "Couldn't find a fid in dentry\n");
139 * v9fs_fid_clone - lookup the fid for a dentry, clone a private copy and
141 * @dentry: dentry to look for fid in
143 * find a fid in the dentry and then clone to a new private fid
154 int fid, err;
161 if(base_fid) { /* clone fid */
162 fid = v9fs_get_idpool(&v9ses->fidpool);
163 if (fid < 0) {
169 err = v9fs_t_walk(v9ses, base_fid->fid, fid, NULL, &fcall);
172 v9fs_put_idpool(fid, &v9ses->fidpool);
176 new_fid = v9fs_fid_create(v9ses, fid);
190 void v9fs_fid_clunk(struct v9fs_session_info *v9ses, struct v9fs_fid *fid)
192 v9fs_t_clunk(v9ses, fid->fid);
193 v9fs_fid_destroy(fid);