summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-06-29 04:27:23 +0200
committerDarrick J. Wong <darrick.wong@oracle.com>2019-06-29 04:27:23 +0200
commit9b0489c1d1918338ef32fe8a0e94989210d7c745 (patch)
tree5163b541e1580613f9f3730cea7ad422aa8da8c4 /fs/xfs/xfs_log.c
parentxfs: factor out iclog size calculation from xlog_sync (diff)
downloadlinux-9b0489c1d1918338ef32fe8a0e94989210d7c745.tar.xz
linux-9b0489c1d1918338ef32fe8a0e94989210d7c745.zip
xfs: update both stat counters together in xlog_sync
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>
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r--fs/xfs/xfs_log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 353430145119..9a6d456592e7 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -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));