]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 27 Apr 2019 07:35:41 +0000 (09:35 +0200)
commit2411a27e7475273aa10179d94bb00e958f6fbec5
tree7aac86346af45b8874a88c7f7cc2d080f7cec2c0
parent4fa17fc730ba3b7f0cb69937df919a7a226067be
xfs: add the ability to join a held buffer to a defer_ops

commit b7b2846fe26f2c0d7f317c874a13d3ecf22670ff upstream.

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>
Signed-off-by: Alex Lyakas <alex@zadara.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/libxfs/xfs_defer.c
fs/xfs/libxfs/xfs_defer.h