diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-03-05 21:44:57 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-04-17 21:39:25 -0400 |
commit | 126468b1156211e26d97f74b2f1767acd141005a (patch) | |
tree | 0bf60d932dad0b4e7bc7c092782b531e550a11b2 /fs/xfs/xfs_vnodeops.c | |
parent | 43973964a386348af0a392266f008ba24170aa30 (diff) |
[XFS] kill xfs_rwlock/xfs_rwunlock
We can just use xfs_ilock/xfs_iunlock instead and get rid of the ugly
bhv_vrwlock_t.
SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30533a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 4765e7c4b75d..811ee874d868 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -3375,47 +3375,6 @@ std_return: | |||
3375 | } | 3375 | } |
3376 | 3376 | ||
3377 | int | 3377 | int |
3378 | xfs_rwlock( | ||
3379 | xfs_inode_t *ip, | ||
3380 | bhv_vrwlock_t locktype) | ||
3381 | { | ||
3382 | if (S_ISDIR(ip->i_d.di_mode)) | ||
3383 | return 1; | ||
3384 | if (locktype == VRWLOCK_WRITE) { | ||
3385 | xfs_ilock(ip, XFS_IOLOCK_EXCL); | ||
3386 | } else if (locktype == VRWLOCK_TRY_READ) { | ||
3387 | return xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED); | ||
3388 | } else if (locktype == VRWLOCK_TRY_WRITE) { | ||
3389 | return xfs_ilock_nowait(ip, XFS_IOLOCK_EXCL); | ||
3390 | } else { | ||
3391 | ASSERT((locktype == VRWLOCK_READ) || | ||
3392 | (locktype == VRWLOCK_WRITE_DIRECT)); | ||
3393 | xfs_ilock(ip, XFS_IOLOCK_SHARED); | ||
3394 | } | ||
3395 | |||
3396 | return 1; | ||
3397 | } | ||
3398 | |||
3399 | |||
3400 | void | ||
3401 | xfs_rwunlock( | ||
3402 | xfs_inode_t *ip, | ||
3403 | bhv_vrwlock_t locktype) | ||
3404 | { | ||
3405 | if (S_ISDIR(ip->i_d.di_mode)) | ||
3406 | return; | ||
3407 | if (locktype == VRWLOCK_WRITE) { | ||
3408 | xfs_iunlock(ip, XFS_IOLOCK_EXCL); | ||
3409 | } else { | ||
3410 | ASSERT((locktype == VRWLOCK_READ) || | ||
3411 | (locktype == VRWLOCK_WRITE_DIRECT)); | ||
3412 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); | ||
3413 | } | ||
3414 | return; | ||
3415 | } | ||
3416 | |||
3417 | |||
3418 | int | ||
3419 | xfs_inode_flush( | 3378 | xfs_inode_flush( |
3420 | xfs_inode_t *ip, | 3379 | xfs_inode_t *ip, |
3421 | int flags) | 3380 | int flags) |