On Tue, 13 Sep 2016, Manfred Spraul wrote:

-       if (ipcperms(ns, &sma->sem_perm, alter ? S_IWUGO : S_IRUGO))
-               goto out_rcu_wakeup;
+       if (ipcperms(ns, &sma->sem_perm, alter ? S_IWUGO : S_IRUGO)) {
+               rcu_read_unlock();
+               goto out_free;
+       }
Is this really better/simpler?
You replace "if (error) goto cleanup" with "if (error) {cleanup_1(); goto cleanup_2()}".

I believe it is better as it clearly separates blocking from non-blocking
exit paths. Overhead of course is irrelevant in both in-house 
wake_up_sem_queue_do
and wake_up_q.

Thanks,
Davidlohr

Reply via email to