aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_vnode.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_vnode.h')
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h
index 56d85d85fb05..6cb0a01df25d 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.h
+++ b/fs/xfs/linux-2.6/xfs_vnode.h
@@ -505,20 +505,6 @@ extern int vn_wait(struct vnode *);
505extern vnode_t *vn_initialize(struct inode *); 505extern vnode_t *vn_initialize(struct inode *);
506 506
507/* 507/*
508 * Acquiring and invalidating vnodes:
509 *
510 * if (vn_get(vp, version, 0))
511 * ...;
512 * vn_purge(vp, version);
513 *
514 * vn_get and vn_purge must be called with vmap_t arguments, sampled
515 * while a lock that the vnode's VOP_RECLAIM function acquires is
516 * held, to ensure that the vnode sampled with the lock held isn't
517 * recycled (VOP_RECLAIMed) or deallocated between the release of the lock
518 * and the subsequent vn_get or vn_purge.
519 */
520
521/*
522 * vnode_map structures _must_ match vn_epoch and vnode structure sizes. 508 * vnode_map structures _must_ match vn_epoch and vnode structure sizes.
523 */ 509 */
524typedef struct vnode_map { 510typedef struct vnode_map {
@@ -532,7 +518,6 @@ typedef struct vnode_map {
532 (vmap).v_ino = (vp)->v_inode.i_ino; } 518 (vmap).v_ino = (vp)->v_inode.i_ino; }
533 519
534extern void vn_purge(struct vnode *, vmap_t *); 520extern void vn_purge(struct vnode *, vmap_t *);
535extern vnode_t *vn_get(struct vnode *, vmap_t *);
536extern int vn_revalidate(struct vnode *); 521extern int vn_revalidate(struct vnode *);
537extern void vn_revalidate_core(struct vnode *, vattr_t *); 522extern void vn_revalidate_core(struct vnode *, vattr_t *);
538extern void vn_remove(struct vnode *); 523extern void vn_remove(struct vnode *);
@@ -560,6 +545,12 @@ extern void vn_rele(struct vnode *);
560#define VN_RELE(vp) (iput(LINVFS_GET_IP(vp))) 545#define VN_RELE(vp) (iput(LINVFS_GET_IP(vp)))
561#endif 546#endif
562 547
548static inline struct vnode *vn_grab(struct vnode *vp)
549{
550 struct inode *inode = igrab(LINVFS_GET_IP(vp));
551 return inode ? LINVFS_GET_VP(inode) : NULL;
552}
553
563/* 554/*
564 * Vname handling macros. 555 * Vname handling macros.
565 */ 556 */