summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dir-item.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2020-02-21 07:36:24 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2020-03-02 20:55:50 -0800
commit6b789c337a5963ae57cbc7fe9e41488c40a9b014 (patch)
treefdfd4eff72242be2512af88b6fa4708ba449d38d /fs/btrfs/dir-item.c
parent98d54f81e36ba3bf92172791eba5ca5bd813989b (diff)
downloadlinux-6b789c337a5963ae57cbc7fe9e41488c40a9b014.tar.bz2
xfs: fix iclog release error check race with shutdown
Prior to commit df732b29c8 ("xfs: call xlog_state_release_iclog with l_icloglock held"), xlog_state_release_iclog() always performed a locked check of the iclog error state before proceeding into the sync state processing code. As of this commit, part of xlog_state_release_iclog() was open-coded into xfs_log_release_iclog() and as a result the locked error state check was lost. The lockless check still exists, but this doesn't account for the possibility of a race with a shutdown being performed by another task causing the iclog state to change while the original task waits on ->l_icloglock. This has reproduced very rarely via generic/475 and manifests as an assert failure in __xlog_state_release_iclog() due to an unexpected iclog state. Restore the locked error state check in xlog_state_release_iclog() to ensure that an iclog state update via shutdown doesn't race with the iclog release state processing code. Fixes: df732b29c807 ("xfs: call xlog_state_release_iclog with l_icloglock held") Reported-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-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>
Diffstat (limited to 'fs/btrfs/dir-item.c')
0 files changed, 0 insertions, 0 deletions