]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: don't commit the first deferred transaction without intents
authorDave Chinner <dchinner@redhat.com>
Wed, 4 May 2022 01:46:00 +0000 (11:46 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 4 May 2022 01:46:00 +0000 (11:46 +1000)
commitfb50b4349ef40994a800d6a6b0f44cecc7c7c3e8
tree2293f6b600ceb14f0e9a0d9bd675ee78bbc31b13
parenta9f493abb9219e0e8e666221b84d925547369322
xfs: don't commit the first deferred transaction without intents

If the first operation in a string of defer ops has no intents,
then there is no reason to commit it before running the first call
to xfs_defer_finish_one(). This allows the defer ops to be used
effectively for non-intent based operations without requiring an
unnecessary extra transaction commit when first called.

This fixes a regression in per-attribute modification transaction
count when delayed attributes are not being used.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/libxfs/xfs_defer.c