On Fri, 8 Aug 2025 14:00:08 +0000 Pasha Tatashin <pasha.tatashin@xxxxxxxxxx> wrote: > > > I suppose this could be simplified a bit to: > > > > > > err = xa_err(physxa); > > > if (err || physxa) { > > > xa_destroy(&new_physxa->phys_bits); > > > kfree(new_physxa); > > > > > > if (err) > > > return err; > > > } else { > > > physxa = new_physxa; > > > } > > > > My email client completely messed the whitespace up so this is a bit > > unreadable. Here is what I meant: > > > > err = xa_err(physxa); > > if (err || physxa) { > > xa_destroy(&new_physxa->phys_bits); > > kfree(new_physxa); > > > > if (err) > > return err; > > } else { > > physxa = new_physxa; > > } > > > > [...] > > Thanks Pratyush, I will make this simplification change if Andrew does > not take this patch in before the next revision. > Yes please on the simplification - the original has an irritating amount of kinda duplication of things from other places. Perhaps a bit of a redo of these functions would clean things up. But later. Can we please have this as a standalone hotfix patch with a cc:stable? As Pratyush helpfully suggested in https://lkml.kernel.org/r/mafs0sei2aw80.fsf@xxxxxxxxxx. Thanks.