I added a comment about that too.
No, neither one is needed because of the way suspending_task is used.
It's not necessary for a reader R to see the variable's actual value;
all R needs to know is whether or not suspending_task is equal to R.
Since the only process which can set suspending_task to R is R itself,
and since R will set suspending_task back to NULL before releasing the
write lock on pm_sleep_rwsem, there's never any ambiguity.
Alan Stern
--