Skip to content

Commit

Permalink
xfs: update both stat counters together in xlog_sync
Browse files Browse the repository at this point in the history
Just a small bit of code tidying up.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  • Loading branch information
Christoph Hellwig authored and Darrick J. Wong committed Jun 29, 2019
1 parent db0a6fa commit 9b0489c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/xfs/xfs_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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));
Expand Down

0 comments on commit 9b0489c

Please sign in to comment.