Re: [PATCH] more deprectation bits

Andrew Morton (akpm@digeo.com)
Sun, 29 Dec 2002 13:55:48 -0800


Christoph Hellwig wrote:
>
> On Sun, Dec 29, 2002 at 01:38:51PM -0800, Andrew Morton wrote:
> > Christoph Hellwig wrote:
> > >
> > > Rename the deprecated attribute to __deprecated to make it obvious
> > > this is something special and to avoid namespace clashes.
> > >
> > > Mark more functionality deprecated:
> > >
> > > - sleep_on & friends
> >
> > Please do not make sleep_on() generate a warning. Unless you intend
> > to do the same to lock_kernel().
> >
> > ext3 uses sleep_on(). It is perfectly safe.
>
> Even if it's safe in that particular case, most code in the kernel runs
> without BKL. This patch just makes the deprication of sleep_on
> explicit.

This would be more appropriate:

--- 25/kernel/sched.c~a Sun Dec 29 13:53:24 2002
+++ 25-akpm/kernel/sched.c Sun Dec 29 13:54:27 2002
@@ -1264,7 +1264,14 @@ long interruptible_sleep_on_timeout(wait

void sleep_on(wait_queue_head_t *q)
{
+ static int count;
+
SLEEP_ON_VAR
+
+ if (count < 10 && !kernel_locked()) {
+ count++;
+ WARN_ON(1);
+ }

current->state = TASK_UNINTERRUPTIBLE;

> > Weaning ext3 off lock_kernel()
> > is a large, delicate and thus-far undesigned body of work. I've been
> > working on other stuff and it is quite unlikely that ext3 locking will
> > be redesigned in the 2.5 timeframe.
>
> Then ext3 has to live with using depricated interfaces during 2.6,
> what's the point?

We shouldn't generate tons of bogus warnings for something which
everyone knows about anyway.
-
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/