xfs: don't try to get a reference to a NULL oz in xfs_get_cached_zone

oz can be NULL when we resample it after taking i_flags_lock, so account
for that.

Fixes: 2d829cc767 ("xfs: fix racy open zone caching")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hans Holmberg <hans.holmberg@wdc.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
Christoph Hellwig 2026-09-14 13:35:38 +02:00 • committed by Carlos Maiolino
commit 14e379600d