xfs: add the ability to join a held buffer to a defer_ops
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 8 Dec 2017 03:07:02 +0000 (19:07 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 14 Dec 2017 17:17:35 +0000 (09:17 -0800)
commitb7b2846fe26f2c0d7f317c874a13d3ecf22670ff
treeae535b8a61a4e8721e038c3dc5727f5192c02dc5
parentb7e0b6ff54dd92febbb1914ab93cd6a21622e169
xfs: add the ability to join a held buffer to a defer_ops

In certain cases, defer_ops callers will lock a buffer and want to hold
the lock across transaction rolls.  Similar to ijoined inodes, we want
to dirty & join the buffer with each transaction roll in defer_finish so
that afterwards the caller still owns the buffer lock and we haven't
inadvertently pinned the log.

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