Commit 9b0489c1 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong

xfs: update both stat counters together in xlog_sync

Just a small bit of code tidying up.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent db0a6faf
......@@ -1859,7 +1859,6 @@ xlog_sync(
unsigned int size;
bool need_flush = true;
XFS_STATS_INC(log->l_mp, xs_log_writes);
ASSERT(atomic_read(&iclog->ic_refcnt) == 0);
count = xlog_calc_iclog_size(log, iclog, &roundoff);
......@@ -1877,6 +1876,7 @@ xlog_sync(
size += roundoff;
iclog->ic_header.h_len = cpu_to_be32(size);
XFS_STATS_INC(log->l_mp, xs_log_writes);
XFS_STATS_ADD(log->l_mp, xs_log_blocks, BTOBB(count));
bno = BLOCK_LSN(be64_to_cpu(iclog->ic_header.h_lsn));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment