Re: [PATCH 4/4] s390/pci: Use lock guard for pci_rescan_remove_lock
From: Benjamin Block
Date: Mon Mar 09 2026 - 06:58:12 EST
On Mon, Mar 09, 2026 at 09:38:45AM +0200, Ilpo Järvinen wrote:
> On Fri, 6 Mar 2026, Benjamin Block wrote:
> > - pci_lock_rescan_remove();
> > - zpci_device_reserved(zdev);
> > - pci_unlock_rescan_remove();
> > + scoped_guard(pci_rescan_remove)
> > + zpci_device_reserved(zdev);
>
> Order in this series is weird. Why not introduce *guard() support before
> the fix (reorder patches 2 and 3) and then use guard direct here so you
> don't have to immediately change the code again to "convert" it to use
> *guard() in patch 4?
The main intention here was to make it easier on me (and others) to retrofit
this in stable and/or distribution Kernels. I know this isn't a main concern
for the upstream master, but it would make my life a bit easier :)
Although, ofc., it isn't required, so in doubt, I can change it. Given that
the Maintainers are actually OK with the use of guards, in any case.
--
Best Regards, Benjamin Block / Linux on IBM Z Kernel Development
IBM Deutschland Research & Development GmbH / https://www.ibm.com/privacy
Vors. Aufs.-R.: Wolfgang Wendt / Geschäftsführung: David Faller
Sitz der Ges.: Ehningen / Registergericht: AmtsG Stuttgart, HRB 243294