diff options
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 7a99ed3b187f..39f0b1ed3224 100644 --- a/fs/xfs/xfs_trans.c +++ b/fs/xfs/xfs_trans.c | |||
@@ -236,11 +236,8 @@ xfs_trans_alloc( | |||
236 | xfs_mount_t *mp, | 236 | xfs_mount_t *mp, |
237 | uint type) | 237 | uint type) |
238 | { | 238 | { |
239 | fs_check_frozen(XFS_MTOVFS(mp), SB_FREEZE_TRANS); | 239 | vfs_wait_for_freeze(XFS_MTOVFS(mp), SB_FREEZE_TRANS); |
240 | atomic_inc(&mp->m_active_trans); | 240 | return _xfs_trans_alloc(mp, type); |
241 | |||
242 | return (_xfs_trans_alloc(mp, type)); | ||
243 | |||
244 | } | 241 | } |
245 | 242 | ||
246 | xfs_trans_t * | 243 | xfs_trans_t * |
@@ -250,12 +247,9 @@ _xfs_trans_alloc( | |||
250 | { | 247 | { |
251 | xfs_trans_t *tp; | 248 | xfs_trans_t *tp; |
252 | 249 | ||
253 | ASSERT(xfs_trans_zone != NULL); | 250 | atomic_inc(&mp->m_active_trans); |
254 | tp = kmem_zone_zalloc(xfs_trans_zone, KM_SLEEP); | ||
255 | 251 | ||
256 | /* | 252 | tp = kmem_zone_zalloc(xfs_trans_zone, KM_SLEEP); |
257 | * Initialize the transaction structure. | ||
258 | */ | ||
259 | tp->t_magic = XFS_TRANS_MAGIC; | 253 | tp->t_magic = XFS_TRANS_MAGIC; |
260 | tp->t_type = type; | 254 | tp->t_type = type; |
261 | tp->t_mountp = mp; | 255 | tp->t_mountp = mp; |
@@ -263,8 +257,7 @@ _xfs_trans_alloc( | |||
263 | tp->t_busy_free = XFS_LBC_NUM_SLOTS; | 257 | tp->t_busy_free = XFS_LBC_NUM_SLOTS; |
264 | XFS_LIC_INIT(&(tp->t_items)); | 258 | XFS_LIC_INIT(&(tp->t_items)); |
265 | XFS_LBC_INIT(&(tp->t_busy)); | 259 | XFS_LBC_INIT(&(tp->t_busy)); |
266 | 260 | return tp; | |
267 | return (tp); | ||
268 | } | 261 | } |
269 | 262 | ||
270 | /* | 263 | /* |