diff options
author | Christoph Hellwig <hch@sgi.com> | 2005-09-02 02:24:19 -0400 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2005-09-02 02:24:19 -0400 |
commit | cdb626878f6f5e37d678d30c9cacf5726b88a656 (patch) | |
tree | 2c9ff3f0ce5831bc34820ffbaffa8681fa1e0271 /fs/xfs/linux-2.6/xfs_vnode.h | |
parent | bb3f724e12eb9c62c92ff6f14a856bc58ba35f5e (diff) |
[XFS] replace vn_get usage by ihold
SGI-PV: 938306
SGI-Modid: xfs-linux:xfs-kern:194627a
Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_vnode.h')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_vnode.h | 21 |
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 *); | |||
505 | extern vnode_t *vn_initialize(struct inode *); | 505 | extern 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 | */ |
524 | typedef struct vnode_map { | 510 | typedef 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 | ||
534 | extern void vn_purge(struct vnode *, vmap_t *); | 520 | extern void vn_purge(struct vnode *, vmap_t *); |
535 | extern vnode_t *vn_get(struct vnode *, vmap_t *); | ||
536 | extern int vn_revalidate(struct vnode *); | 521 | extern int vn_revalidate(struct vnode *); |
537 | extern void vn_revalidate_core(struct vnode *, vattr_t *); | 522 | extern void vn_revalidate_core(struct vnode *, vattr_t *); |
538 | extern void vn_remove(struct vnode *); | 523 | extern 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 | ||
548 | static 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 | */ |