Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124928
b: refs/heads/master
c: 39e2def
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Niv Sardi committed Dec 4, 2008
1 parent b705b13 commit ff08da4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d9424b3c4a1e96f87c6cfd4d8dd2f8d9bbb4dcc5
refs/heads/master: 39e2defe73106ca2e1c85e5286038a0a13f49513
13 changes: 6 additions & 7 deletions trunk/fs/xfs/xfs_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,8 +729,8 @@ xfs_log_unmount_write(xfs_mount_t *mp)
spin_lock(&log->l_icloglock);
iclog = log->l_iclog;
atomic_inc(&iclog->ic_refcnt);
spin_unlock(&log->l_icloglock);
xlog_state_want_sync(log, iclog);
spin_unlock(&log->l_icloglock);
error = xlog_state_release_iclog(log, iclog);

spin_lock(&log->l_icloglock);
Expand Down Expand Up @@ -767,9 +767,9 @@ xfs_log_unmount_write(xfs_mount_t *mp)
spin_lock(&log->l_icloglock);
iclog = log->l_iclog;
atomic_inc(&iclog->ic_refcnt);
spin_unlock(&log->l_icloglock);

xlog_state_want_sync(log, iclog);
spin_unlock(&log->l_icloglock);
error = xlog_state_release_iclog(log, iclog);

spin_lock(&log->l_icloglock);
Expand Down Expand Up @@ -1984,7 +1984,9 @@ xlog_write(xfs_mount_t * mp,
if (iclog->ic_size - log_offset <= sizeof(xlog_op_header_t)) {
xlog_state_finish_copy(log, iclog, record_cnt, data_cnt);
record_cnt = data_cnt = 0;
spin_lock(&log->l_icloglock);
xlog_state_want_sync(log, iclog);
spin_unlock(&log->l_icloglock);
if (commit_iclog) {
ASSERT(flags & XLOG_COMMIT_TRANS);
*commit_iclog = iclog;
Expand Down Expand Up @@ -3193,18 +3195,15 @@ xlog_state_sync(xlog_t *log,
STATIC void
xlog_state_want_sync(xlog_t *log, xlog_in_core_t *iclog)
{
spin_lock(&log->l_icloglock);
ASSERT(spin_is_locked(&log->l_icloglock));

if (iclog->ic_state == XLOG_STATE_ACTIVE) {
xlog_state_switch_iclogs(log, iclog, 0);
} else {
ASSERT(iclog->ic_state &
(XLOG_STATE_WANT_SYNC|XLOG_STATE_IOERROR));
}

spin_unlock(&log->l_icloglock);
} /* xlog_state_want_sync */

}


/*****************************************************************************
Expand Down

0 comments on commit ff08da4

Please sign in to comment.