[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20090218142642.2505ed5f.akpm@linux-foundation.org>
Date: Wed, 18 Feb 2009 14:26:42 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Ingo Molnar <mingo@...e.hu>
Cc: npiggin@...e.de, a.p.zijlstra@...llo.nl,
linux-kernel@...r.kernel.org
Subject: Re: [locking bug] inotify: inconsistent {RECLAIM_FS-ON-W} ->
{IN-RECLAIM_FS-W} usage.
On Mon, 16 Feb 2009 09:13:04 +0100
Ingo Molnar <mingo@...e.hu> wrote:
> --- a/fs/notify/inotify/inotify.c
> +++ b/fs/notify/inotify/inotify.c
> @@ -156,7 +156,7 @@ static int inotify_handle_get_wd(struct inotify_handle *ih,
> int ret;
>
> do {
> - if (unlikely(!idr_pre_get(&ih->idr, GFP_KERNEL)))
> + if (unlikely(!idr_pre_get(&ih->idr, GFP_NOFS)))
Geeze the IDR interface sucks.
> return -ENOSPC;
Well that doesn't make a lot of sense.
> ret = idr_get_new_above(&ih->idr, watch, ih->last_wd+1, &watch->wd);
> } while (ret == -EAGAIN);
And afacit that can't happen. We hold the lock, so if idr_pre_get()
succeeded, idr_get_new_above() will not return -EAGAIN (which should
have been -ENOMEM).
I'd better stop looking.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists