summaryrefslogtreecommitdiffstats
path: root/fs/jffs2/xattr.h
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2022-03-30 03:21:59 +0200
committerDarrick J. Wong <djwong@kernel.org>2022-03-30 03:21:59 +0200
commitd2d7c0473586d2f22e85d615275f34cf19f94447 (patch)
treed1eac5348d5a8c6a705b0d94543355c2ec059ee0 /fs/jffs2/xattr.h
parentxfs: don't report reserved bnobt space as available (diff)
downloadlinux-d2d7c0473586d2f22e85d615275f34cf19f94447.tar.xz
linux-d2d7c0473586d2f22e85d615275f34cf19f94447.zip
xfs: aborting inodes on shutdown may need buffer lock
Most buffer io list operations are run with the bp->b_lock held, but xfs_iflush_abort() can be called without the buffer lock being held resulting in inodes being removed from the buffer list while other list operations are occurring. This causes problems with corrupted bp->b_io_list inode lists during filesystem shutdown, leading to traversals that never end, double removals from the AIL, etc. Fix this by passing the buffer to xfs_iflush_abort() if we have it locked. If the inode is attached to the buffer, we're going to have to remove it from the buffer list and we'd have to get the buffer off the inode log item to do that anyway. If we don't have a buffer passed in (e.g. from xfs_reclaim_inode()) then we can determine if the inode has a log item and if it is attached to a buffer before we do anything else. If it does have an attached buffer, we can lock it safely (because the inode has a reference to it) and then perform the inode abort. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/jffs2/xattr.h')
0 files changed, 0 insertions, 0 deletions