Thread (137 messages) 137 messages, 11 authors, 2025-10-09

Re: [PATCH v3 01/30] kho: init new_physxa->phys_bits to fix lockdep

From: Andrew Morton <akpm@linux-foundation.org>
Date: 2025-08-08 19:06:19
Also in: linux-doc, linux-fsdevel, linux-mm, lkml

On Fri, 8 Aug 2025 14:00:08 +0000 Pasha Tatashin [off-list ref] wrote:
quoted
quoted
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@kernel.org.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help