diff options
| author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-08-17 10:57:56 +0400 | 
|---|---|---|
| committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-08-17 11:01:08 +0400 | 
| commit | a22ddff8bedfe33eeb1330bbb7ef1fbe007a42c4 (patch) | |
| tree | 61a2eb7fa62f5af10c2b913ca429e6b068b0eb2d /fs/xfs/xfs_trans.c | |
| parent | 20d5a540e55a29daeef12706f9ee73baf5641c16 (diff) | |
| parent | d9875690d9b89a866022ff49e3fcea892345ad92 (diff) | |
| download | linux-a22ddff8bedfe33eeb1330bbb7ef1fbe007a42c4.tar.xz | |
Merge tag 'v3.6-rc2' into drm-intel-next
Backmerge Linux 3.6-rc2 to resolve a few funny conflicts before we put
even more madness on top:
- drivers/gpu/drm/i915/i915_irq.c: Just a spurious WARN removed in
  -fixes, that has been changed in a variable-rename in -next, too.
- drivers/gpu/drm/i915/intel_ringbuffer.c: -next remove scratch_addr
  (since all their users have been extracted in another fucntion),
  -fixes added another user for a hw workaroudn.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'fs/xfs/xfs_trans.c')
| -rw-r--r-- | fs/xfs/xfs_trans.c | 17 | 
1 files changed, 14 insertions, 3 deletions
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c index fdf324508c5e..06ed520a767f 100644 --- a/fs/xfs/xfs_trans.c +++ b/fs/xfs/xfs_trans.c @@ -576,8 +576,12 @@ xfs_trans_alloc(  	xfs_mount_t	*mp,  	uint		type)  { -	xfs_wait_for_freeze(mp, SB_FREEZE_TRANS); -	return _xfs_trans_alloc(mp, type, KM_SLEEP); +	xfs_trans_t     *tp; + +	sb_start_intwrite(mp->m_super); +	tp = _xfs_trans_alloc(mp, type, KM_SLEEP); +	tp->t_flags |= XFS_TRANS_FREEZE_PROT; +	return tp;  }  xfs_trans_t * @@ -588,6 +592,7 @@ _xfs_trans_alloc(  {  	xfs_trans_t	*tp; +	WARN_ON(mp->m_super->s_writers.frozen == SB_FREEZE_COMPLETE);  	atomic_inc(&mp->m_active_trans);  	tp = kmem_zone_zalloc(xfs_trans_zone, memflags); @@ -611,6 +616,8 @@ xfs_trans_free(  	xfs_extent_busy_clear(tp->t_mountp, &tp->t_busy, false);  	atomic_dec(&tp->t_mountp->m_active_trans); +	if (tp->t_flags & XFS_TRANS_FREEZE_PROT) +		sb_end_intwrite(tp->t_mountp->m_super);  	xfs_trans_free_dqinfo(tp);  	kmem_zone_free(xfs_trans_zone, tp);  } @@ -643,7 +650,11 @@ xfs_trans_dup(  	ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES);  	ASSERT(tp->t_ticket != NULL); -	ntp->t_flags = XFS_TRANS_PERM_LOG_RES | (tp->t_flags & XFS_TRANS_RESERVE); +	ntp->t_flags = XFS_TRANS_PERM_LOG_RES | +		       (tp->t_flags & XFS_TRANS_RESERVE) | +		       (tp->t_flags & XFS_TRANS_FREEZE_PROT); +	/* We gave our writer reference to the new transaction */ +	tp->t_flags &= ~XFS_TRANS_FREEZE_PROT;  	ntp->t_ticket = xfs_log_ticket_get(tp->t_ticket);  	ntp->t_blk_res = tp->t_blk_res - tp->t_blk_res_used;  	tp->t_blk_res = tp->t_blk_res_used;  | 
