summaryrefslogtreecommitdiffstats
path: root/fs/hfs
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2018-11-19 13:31:08 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2018-11-20 10:36:01 -0800
commitd43aaf1685aa471f0593685c9f54d53e3af3cf3f (patch)
treebba393dac291862f520d931d9968fb8c4a030a9d /fs/hfs
parentd61fa8cbf3da85ffca6620f261354941c126ee23 (diff)
downloadlinux-stable-d43aaf1685aa471f0593685c9f54d53e3af3cf3f.tar.gz
linux-stable-d43aaf1685aa471f0593685c9f54d53e3af3cf3f.tar.bz2
linux-stable-d43aaf1685aa471f0593685c9f54d53e3af3cf3f.zip
xfs: fix transient reference count error in xfs_buf_resubmit_failed_buffers
When retrying a failed inode or dquot buffer, xfs_buf_resubmit_failed_buffers() clears all the failed flags from the inde/dquot log items. In doing so, it also drops all the reference counts on the buffer that the failed log items hold. This means it can drop all the active references on the buffer and hence free the buffer before it queues it for write again. Putting the buffer on the delwri queue takes a reference to the buffer (so that it hangs around until it has been written and completed), but this goes bang if the buffer has already been freed. Hence we need to add the buffer to the delwri queue before we remove the failed flags from the log items attached to the buffer to ensure it always remains referenced during the resubmit process. Reported-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Dave Chinner <dchinner@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/hfs')
0 files changed, 0 insertions, 0 deletions