summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2020-06-29 14:48:46 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2020-07-06 10:46:58 -0700
commitf593bf144c7dfee9715aa787ebbbe5dd8882e8e9 (patch)
tree4190924b5e494b4253b5a9b69a6c7b88aa93dce7 /fs/xfs/xfs_inode.c
parent1319ebefd6ed7a9988b7b4bc9317fbcf61a28bfc (diff)
downloadlinux-stable-f593bf144c7dfee9715aa787ebbbe5dd8882e8e9.tar.gz
linux-stable-f593bf144c7dfee9715aa787ebbbe5dd8882e8e9.tar.bz2
linux-stable-f593bf144c7dfee9715aa787ebbbe5dd8882e8e9.zip
xfs: mark inode buffers in cache
Inode buffers always have write IO callbacks, so by marking them directly we can avoid needing to attach ->b_iodone functions to them. This avoids an indirect call, and makes future modifications much simpler. While this is largely a refactor of existing functionality, we broaden the scope of the flag to beyond where inodes are explicitly attached because future changes need to know what type of log items are attached to the buffer. Adding this buffer flag may invoke the inode iodone callback in cases where it wouldn't have been previously, but this is not a functional change because the callback is identical to the normal buffer write iodone callback when inodes are not attached. 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_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index d6da08165a2e..4621d67f3428 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -3862,13 +3862,13 @@ flush_out:
* completion on the buffer to remove the inode from the AIL and release
* the flush lock.
*/
+ bp->b_flags |= _XBF_INODES;
xfs_buf_attach_iodone(bp, xfs_iflush_done, &iip->ili_item);
/* generate the checksum. */
xfs_dinode_calc_crc(mp, dip);
ASSERT(!list_empty(&bp->b_li_list));
- ASSERT(bp->b_iodone != NULL);
return error;
}