v6.5 backport request: 6d2779ecaeb56f92 ("locking/atomic: scripts: fix fallback ifdeffery")