]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: refactor the buffer cancellation table helpers
authorChristoph Hellwig <hch@lst.de>
Mon, 27 Apr 2020 18:14:59 +0000 (11:14 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 4 May 2020 16:03:15 +0000 (09:03 -0700)
commit684f585d71a158fff7f18cb00f5d3f0e694f6e02
tree695c59b4fce6f3e6c968c71fd30155d0f960c8ae
parentc054e1c160d1d1d02871b15751fc33d4b1fa539b
xfs: refactor the buffer cancellation table helpers

Replace the somewhat convoluted use of xlog_peek_buffer_cancelled and
xlog_check_buffer_cancelled with two obvious helpers:

 xlog_is_buffer_cancelled, which returns true if there is a buffer in
 the cancellation table, and
 xlog_put_buffer_cancelled, which also decrements the reference count
 of the buffer cancellation table.

Both share a little helper to look up the entry.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_log_recover.c