diff options
Diffstat (limited to 'fs/9p/v9fs.h')
-rw-r--r-- | fs/9p/v9fs.h | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/fs/9p/v9fs.h b/fs/9p/v9fs.h index e5ebedfc5ed..e78956cbd70 100644 --- a/fs/9p/v9fs.h +++ b/fs/9p/v9fs.h | |||
@@ -125,8 +125,8 @@ struct v9fs_inode { | |||
125 | #ifdef CONFIG_9P_FSCACHE | 125 | #ifdef CONFIG_9P_FSCACHE |
126 | spinlock_t fscache_lock; | 126 | spinlock_t fscache_lock; |
127 | struct fscache_cookie *fscache; | 127 | struct fscache_cookie *fscache; |
128 | struct p9_qid *fscache_key; | ||
129 | #endif | 128 | #endif |
129 | struct p9_qid qid; | ||
130 | unsigned int cache_validity; | 130 | unsigned int cache_validity; |
131 | struct p9_fid *writeback_fid; | 131 | struct p9_fid *writeback_fid; |
132 | struct mutex v_mutex; | 132 | struct mutex v_mutex; |
@@ -153,13 +153,13 @@ extern void v9fs_vfs_put_link(struct dentry *dentry, struct nameidata *nd, | |||
153 | void *p); | 153 | void *p); |
154 | extern struct inode *v9fs_inode_from_fid(struct v9fs_session_info *v9ses, | 154 | extern struct inode *v9fs_inode_from_fid(struct v9fs_session_info *v9ses, |
155 | struct p9_fid *fid, | 155 | struct p9_fid *fid, |
156 | struct super_block *sb); | 156 | struct super_block *sb, int new); |
157 | extern const struct inode_operations v9fs_dir_inode_operations_dotl; | 157 | extern const struct inode_operations v9fs_dir_inode_operations_dotl; |
158 | extern const struct inode_operations v9fs_file_inode_operations_dotl; | 158 | extern const struct inode_operations v9fs_file_inode_operations_dotl; |
159 | extern const struct inode_operations v9fs_symlink_inode_operations_dotl; | 159 | extern const struct inode_operations v9fs_symlink_inode_operations_dotl; |
160 | extern struct inode *v9fs_inode_from_fid_dotl(struct v9fs_session_info *v9ses, | 160 | extern struct inode *v9fs_inode_from_fid_dotl(struct v9fs_session_info *v9ses, |
161 | struct p9_fid *fid, | 161 | struct p9_fid *fid, |
162 | struct super_block *sb); | 162 | struct super_block *sb, int new); |
163 | 163 | ||
164 | /* other default globals */ | 164 | /* other default globals */ |
165 | #define V9FS_PORT 564 | 165 | #define V9FS_PORT 564 |
@@ -201,8 +201,27 @@ v9fs_get_inode_from_fid(struct v9fs_session_info *v9ses, struct p9_fid *fid, | |||
201 | struct super_block *sb) | 201 | struct super_block *sb) |
202 | { | 202 | { |
203 | if (v9fs_proto_dotl(v9ses)) | 203 | if (v9fs_proto_dotl(v9ses)) |
204 | return v9fs_inode_from_fid_dotl(v9ses, fid, sb); | 204 | return v9fs_inode_from_fid_dotl(v9ses, fid, sb, 0); |
205 | else | 205 | else |
206 | return v9fs_inode_from_fid(v9ses, fid, sb); | 206 | return v9fs_inode_from_fid(v9ses, fid, sb, 0); |
207 | } | 207 | } |
208 | |||
209 | /** | ||
210 | * v9fs_get_new_inode_from_fid - Helper routine to populate an inode by | ||
211 | * issuing a attribute request | ||
212 | * @v9ses: session information | ||
213 | * @fid: fid to issue attribute request for | ||
214 | * @sb: superblock on which to create inode | ||
215 | * | ||
216 | */ | ||
217 | static inline struct inode * | ||
218 | v9fs_get_new_inode_from_fid(struct v9fs_session_info *v9ses, struct p9_fid *fid, | ||
219 | struct super_block *sb) | ||
220 | { | ||
221 | if (v9fs_proto_dotl(v9ses)) | ||
222 | return v9fs_inode_from_fid_dotl(v9ses, fid, sb, 1); | ||
223 | else | ||
224 | return v9fs_inode_from_fid(v9ses, fid, sb, 1); | ||
225 | } | ||
226 | |||
208 | #endif | 227 | #endif |