summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_buf_item.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2020-06-30 00:48:59 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2020-07-06 20:46:59 +0300
commit6f5de1808e3663917b5c682e2d91d95645ce2df2 (patch)
treec00a48a3239eee830161d953b3db78a84e4d625f /fs/xfs/xfs_buf_item.c
parentaac855ab1a98d9c20762047f26af47d391c3ba7a (diff)
downloadlinux-6f5de1808e3663917b5c682e2d91d95645ce2df2.tar.xz
xfs: use direct calls for dquot IO completion
Similar to inodes, we can call the dquot IO completion functions directly from the buffer completion code, removing another user of log item callbacks for IO completion processing. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Brian Foster <bfoster@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_buf_item.c')
-rw-r--r--fs/xfs/xfs_buf_item.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c
index a4e416af5c61..f46e5ec28111 100644
--- a/fs/xfs/xfs_buf_item.c
+++ b/fs/xfs/xfs_buf_item.c
@@ -15,6 +15,9 @@
#include "xfs_buf_item.h"
#include "xfs_inode.h"
#include "xfs_inode_item.h"
+#include "xfs_quota.h"
+#include "xfs_dquot_item.h"
+#include "xfs_dquot.h"
#include "xfs_trans_priv.h"
#include "xfs_trace.h"
#include "xfs_log.h"
@@ -1209,7 +1212,20 @@ void
xfs_buf_dquot_iodone(
struct xfs_buf *bp)
{
- xfs_buf_run_callbacks(bp);
+ struct xfs_buf_log_item *blip = bp->b_log_item;
+ struct xfs_log_item *lip;
+
+ if (xfs_buf_had_callback_errors(bp))
+ return;
+
+ /* a newly allocated dquot buffer might have a log item attached */
+ if (blip) {
+ lip = &blip->bli_item;
+ lip->li_cb(bp, lip);
+ bp->b_log_item = NULL;
+ }
+
+ xfs_dquot_done(bp);
xfs_buf_ioend_finish(bp);
}