Messages in this thread | ![/](/images/icornerl.gif) | | Subject | Re: [RFC,PATCH] use rcu for fasync_lock | From | OGAWA Hirofumi <> | Date | Mon, 22 Dec 2003 03:38:41 +0900 |
| |
Manfred Spraul <manfred@colorfullife.com> writes:
> void kill_fasync(struct fasync_struct **fp, int sig, int band) > { > - read_lock(&fasync_lock); > + rcu_read_lock(); > __kill_fasync(*fp, sig, band); > - read_unlock(&fasync_lock); > + rcu_read_unlock(); > }
Usually *fp is NULL, I think. So what about the following test?
void kill_fasync(struct fasync_struct **fp, int sig, int band) { if (*fp) { rcu_read_lock(); __kill_fasync(*fp, sig, band); rcu_read_unlock(); } }
Or use inline function for testing *fp. -- OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |