2002-11-20 17:44:15

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH] remove unused includes and misleading comments from scsi_lib.c

On Wed, Nov 20, 2002 at 08:47:09AM -0800, Patrick Mansfield wrote:
> I had to add back the smp_lock.h include to compile with CONFIG_PREEMPT,
> as kernel_locked was not defined and is used by in_atomic().

Bah. Any chance you could fix the header declaring in_atomic() to pull
in smp_lock.h by itself instead?


2002-11-20 19:04:41

by Patrick Mansfield

[permalink] [raw]
Subject: Re: [PATCH] remove unused includes and misleading comments from scsi_lib.c

On Wed, Nov 20, 2002 at 06:50:48PM +0100, Christoph Hellwig wrote:
> On Wed, Nov 20, 2002 at 08:47:09AM -0800, Patrick Mansfield wrote:
> > I had to add back the smp_lock.h include to compile with CONFIG_PREEMPT,
> > as kernel_locked was not defined and is used by in_atomic().
>
> Bah. Any chance you could fix the header declaring in_atomic() to pull
> in smp_lock.h by itself instead?

It is in hardirq.h, arch specific, 11 of the 20 hardirq.h files would
need the change (they reference kernel_locked) to include smp_lock.h.

665 files include smp_lock.h
89 files include hardirq.h
32 files include both

So, should I change the arch hardirq.h files to include smp_lock.h,
or just add smp_lock.h to scsi_lib.c?

-- Patrick Mansfield