Lines Matching refs:fhp

183 inline static char * SVCFH_fmt(struct svc_fh *fhp)  in SVCFH_fmt()  argument
185 struct knfsd_fh *fh = &fhp->fh_handle; in SVCFH_fmt()
220 fh_init(struct svc_fh *fhp, int maxsize) in fh_init() argument
222 memset(fhp, 0, sizeof(*fhp)); in fh_init()
223 fhp->fh_maxsize = maxsize; in fh_init()
224 return fhp; in fh_init()
232 fill_pre_wcc(struct svc_fh *fhp) in fill_pre_wcc() argument
236 inode = fhp->fh_dentry->d_inode; in fill_pre_wcc()
237 if (!fhp->fh_pre_saved) { in fill_pre_wcc()
238 fhp->fh_pre_mtime = inode->i_mtime; in fill_pre_wcc()
239 fhp->fh_pre_ctime = inode->i_ctime; in fill_pre_wcc()
240 fhp->fh_pre_size = inode->i_size; in fill_pre_wcc()
241 fhp->fh_pre_saved = 1; in fill_pre_wcc()
249 fill_post_wcc(struct svc_fh *fhp) in fill_post_wcc() argument
251 struct inode *inode = fhp->fh_dentry->d_inode; in fill_post_wcc()
253 if (fhp->fh_post_saved) in fill_post_wcc()
256 fhp->fh_post_mode = inode->i_mode; in fill_post_wcc()
257 fhp->fh_post_nlink = inode->i_nlink; in fill_post_wcc()
258 fhp->fh_post_uid = inode->i_uid; in fill_post_wcc()
259 fhp->fh_post_gid = inode->i_gid; in fill_post_wcc()
260 fhp->fh_post_size = inode->i_size; in fill_post_wcc()
262 fhp->fh_post_blksize = inode->i_blksize; in fill_post_wcc()
263 fhp->fh_post_blocks = inode->i_blocks; in fill_post_wcc()
265 fhp->fh_post_blksize = BLOCK_SIZE; in fill_post_wcc()
267 fhp->fh_post_blocks = (inode->i_size+511) >> 9; in fill_post_wcc()
269 fhp->fh_post_rdev = inode->i_rdev; in fill_post_wcc()
270 fhp->fh_post_atime = inode->i_atime; in fill_post_wcc()
271 fhp->fh_post_mtime = inode->i_mtime; in fill_post_wcc()
272 fhp->fh_post_ctime = inode->i_ctime; in fill_post_wcc()
273 fhp->fh_post_saved = 1; in fill_post_wcc()
288 fh_lock(struct svc_fh *fhp) in fh_lock() argument
290 struct dentry *dentry = fhp->fh_dentry; in fh_lock()
294 SVCFH_fmt(fhp), fhp->fh_locked); in fh_lock()
296 if (!fhp->fh_dentry) { in fh_lock()
300 if (fhp->fh_locked) { in fh_lock()
308 fill_pre_wcc(fhp); in fh_lock()
309 fhp->fh_locked = 1; in fh_lock()
316 fh_unlock(struct svc_fh *fhp) in fh_unlock() argument
318 if (!fhp->fh_dentry) in fh_unlock()
321 if (fhp->fh_locked) { in fh_unlock()
322 fill_post_wcc(fhp); in fh_unlock()
323 up(&fhp->fh_dentry->d_inode->i_sem); in fh_unlock()
324 fhp->fh_locked = 0; in fh_unlock()