diff options
author | Nathan Scott <nathans@sgi.com> | 2006-06-09 17:11:55 +1000 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-06-09 17:11:55 +1000 |
commit | 34327e138481137a81a2e33060b8eb0944013801 (patch) | |
tree | d78521e82598c0b1aae46e466f38a5fa99a2b842 /fs/xfs/xfs_trans.c | |
parent | 8285fb58e75bfdb447c7a2c533ec9efdb238f966 (diff) | |
download | op-kernel-dev-34327e138481137a81a2e33060b8eb0944013801.zip op-kernel-dev-34327e138481137a81a2e33060b8eb0944013801.tar.gz |
[XFS] Cleanup a missed porting conversion, and freezing.
SGI-PV: 953338
SGI-Modid: xfs-linux-melb:xfs-kern:26109a
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_trans.c')
-rw-r--r-- | fs/xfs/xfs_trans.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c index 7a99ed3..39f0b1e 100644 --- a/fs/xfs/xfs_trans.c +++ b/fs/xfs/xfs_trans.c @@ -236,11 +236,8 @@ xfs_trans_alloc( xfs_mount_t *mp, uint type) { - fs_check_frozen(XFS_MTOVFS(mp), SB_FREEZE_TRANS); - atomic_inc(&mp->m_active_trans); - - return (_xfs_trans_alloc(mp, type)); - + vfs_wait_for_freeze(XFS_MTOVFS(mp), SB_FREEZE_TRANS); + return _xfs_trans_alloc(mp, type); } xfs_trans_t * @@ -250,12 +247,9 @@ _xfs_trans_alloc( { xfs_trans_t *tp; - ASSERT(xfs_trans_zone != NULL); - tp = kmem_zone_zalloc(xfs_trans_zone, KM_SLEEP); + atomic_inc(&mp->m_active_trans); - /* - * Initialize the transaction structure. - */ + tp = kmem_zone_zalloc(xfs_trans_zone, KM_SLEEP); tp->t_magic = XFS_TRANS_MAGIC; tp->t_type = type; tp->t_mountp = mp; @@ -263,8 +257,7 @@ _xfs_trans_alloc( tp->t_busy_free = XFS_LBC_NUM_SLOTS; XFS_LIC_INIT(&(tp->t_items)); XFS_LBC_INIT(&(tp->t_busy)); - - return (tp); + return tp; } /* |