diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2017-04-21 01:09:05 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-04-25 19:40:42 +0300 |
commit | c4cf1acdb186436b88cc9aeaf08322bc49fec183 (patch) | |
tree | 182b16a4ff2cb81bf720e4d7d2666fa4851cee60 /fs/xfs/xfs_bmap_item.c | |
parent | 20e8a063786050083fe05b4f45be338c60b49126 (diff) | |
download | linux-c4cf1acdb186436b88cc9aeaf08322bc49fec183.tar.xz |
xfs: better log intent item refcount checking
Use ASSERTs on the log intent item refcounts so that we fail noisily if
anyone tries to double-free the item.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_bmap_item.c')
-rw-r--r-- | fs/xfs/xfs_bmap_item.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_bmap_item.c b/fs/xfs/xfs_bmap_item.c index 9bf57c76623b..2d7017373e20 100644 --- a/fs/xfs/xfs_bmap_item.c +++ b/fs/xfs/xfs_bmap_item.c @@ -215,6 +215,7 @@ void xfs_bui_release( struct xfs_bui_log_item *buip) { + ASSERT(atomic_read(&buip->bui_refcount) > 0); if (atomic_dec_and_test(&buip->bui_refcount)) { xfs_trans_ail_remove(&buip->bui_item, SHUTDOWN_LOG_IO_ERROR); xfs_bui_item_free(buip); |