mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
xfs: handle NULL open_zone for merged ioends in xfs_end_ioend_write_zoned
The NULL checks on the merged ioends added in commitae28561189("xfs: handle NULL open_zone for merged ioends in xfs_ioend_put_open_zones") got lost when the code was moved to a new file. Reinstate the check, and also update the comments to be a little more coherent. Fixes:6b855256eb("xfs: split ioend handling into a separate source file") Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
parent
ce58cff107
commit
90388d46b0
|
|
@ -182,15 +182,15 @@ xfs_end_ioend_write_zoned(
|
|||
error = xfs_setfilesize(ip, ioend->io_offset, ioend->io_size);
|
||||
done:
|
||||
/*
|
||||
* Put the open zone for all ioends merged into this one (if any).
|
||||
*/
|
||||
list_for_each_entry(tmp, &ioend->io_list, io_list)
|
||||
xfs_open_zone_put(tmp->io_private);
|
||||
|
||||
/*
|
||||
* The main ioend might not have an open zone if the submission failed
|
||||
* before xfs_zone_alloc_and_submit got called.
|
||||
* Put the open zone references for all ioends merged into this one in
|
||||
* addition to the main one they were merged into. If the submission
|
||||
* failed before xfs_zone_alloc_and_submit got called, there is no open
|
||||
* zone and at least in theory that could also happen for merged ioends.
|
||||
*/
|
||||
list_for_each_entry(tmp, &ioend->io_list, io_list) {
|
||||
if (tmp->io_private)
|
||||
xfs_open_zone_put(tmp->io_private);
|
||||
}
|
||||
if (oz)
|
||||
xfs_open_zone_put(oz);
|
||||
iomap_finish_ioends(ioend, error);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user