On Sun, Feb 05, 2006 at 12:02:35PM -0600, James Bottomley wrote: > On Sat, 2006-02-04 at 16:51 -0800, Andrew Morton wrote: > > in_interrupt() will return true in hard- or soft-irq context on all > > architectures and all .configs - you can certainly use that. > > > > What we cannot use is in_atomic() to detect whether we're inside spinlock - > > that only works if CONFIG_PREEMPT. > > OK, what do you think about this? It introduces an extra api to ensure > user context. I suppose one think that could be done is to get the > wrappers off a slab instead of using kmalloc, but that could be fixed up > later. This looks good to me, and odds are this function will come in handy for other parts of the kernel. thanks, greg k-h - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html