Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[sfrench/cifs-2.6.git] / fs / 9p / fid.h
index 84c673a44c831a3a1ec977e26b1a65d2aed82506..48fc170c26c8c7d5500874b95bd0c57234deb476 100644 (file)
@@ -4,9 +4,8 @@
  *  Copyright (C) 2005 by Eric Van Hensbergen <ericvh@gmail.com>
  *
  *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
+ *  it under the terms of the GNU General Public License version 2
+ *  as published by the Free Software Foundation.
  *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -31,9 +30,10 @@ struct v9fs_fid {
        struct list_head list;   /* list of fids associated with a dentry */
        struct list_head active; /* XXX - debug */
 
+       struct semaphore lock;
+
        u32 fid;
        unsigned char fidopen;    /* set when fid is opened */
-       unsigned char fidcreate;  /* set when fid was just created */
        unsigned char fidclunked; /* set when fid has already been clunked */
 
        struct v9fs_qid qid;
@@ -45,7 +45,6 @@ struct v9fs_fid {
        struct v9fs_fcall *rdir_fcall;
 
        /* management stuff */
-       pid_t pid;              /* thread associated with this fid */
        uid_t uid;              /* user associated with this fid */
 
        /* private data */
@@ -56,5 +55,8 @@ struct v9fs_fid {
 struct v9fs_fid *v9fs_fid_lookup(struct dentry *dentry);
 struct v9fs_fid *v9fs_fid_get_created(struct dentry *);
 void v9fs_fid_destroy(struct v9fs_fid *fid);
-struct v9fs_fid *v9fs_fid_create(struct dentry *,
-       struct v9fs_session_info *v9ses, int fid, int create);
+struct v9fs_fid *v9fs_fid_create(struct v9fs_session_info *, int fid);
+int v9fs_fid_insert(struct v9fs_fid *fid, struct dentry *dentry);
+struct v9fs_fid *v9fs_fid_clone(struct dentry *dentry);
+void v9fs_fid_clunk(struct v9fs_session_info *v9ses, struct v9fs_fid *fid);
+