mirror of
https://github.com/torvalds/linux.git
synced 2026-09-11 20:13:02 +02:00
xfs: handle NULL open_zone for merged ioends in xfs_ioend_put_open_zones
In theory we could fail multiple ioends before an open zone was assigned
to them, and the iomap code could merge them. Check for NULL not only
for the main ioend but also all merged ones on ->io_list to handle this
case.
Fixes: 058dd70c65 ("xfs: implement buffered writes to zoned RT devices")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Hans Holmberg <hans.holmberg@wdc.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
parent
4e07cd78e1
commit
ae28561189
|
|
@ -89,8 +89,10 @@ xfs_ioend_put_open_zones(
|
|||
/*
|
||||
* 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);
|
||||
list_for_each_entry(tmp, &ioend->io_list, io_list) {
|
||||
if (tmp->io_private)
|
||||
xfs_open_zone_put(tmp->io_private);
|
||||
}
|
||||
|
||||
/*
|
||||
* The main ioend might not have an open zone if the submission failed
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user