From: Andrew Morton <akpm@linux-foundation.org>
To: Alex Dubov <oakad@yahoo.com>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] MEMSTICK: add support for legacy memorysticks
Date: Mon, 20 Sep 2010 18:25:37 -0700 [thread overview]
Message-ID: <20100920182537.9e0920ad.akpm@linux-foundation.org> (raw)
In-Reply-To: <553730.24538.qm@web37605.mail.mud.yahoo.com>
On Mon, 20 Sep 2010 18:16:03 -0700 (PDT) Alex Dubov <oakad@yahoo.com> wrote:
> However, do you have a quick
> advice for a case, were idr_pre_get happens outside spin-locked section,
> as opposed to mutex one?
It sucks, but...
again:
if (idr_pre_get(..., GFP_KERNEL) == NULL)
return -ENOMEM; /* We're really out-of-memory */
spin_lock(lock);
if (idr_get_new(...) == -EAGAIN) {
spin_unlock(lock);
goto again; /* Someone stole our preallocation! */
}
next prev parent reply other threads:[~2010-09-21 1:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-30 10:48 [PATCH 0/3 RESEND] My work on MemoryStick system Maxim Levitsky
2010-08-30 10:48 ` [PATCH 1/3] memstick: few changes to core Maxim Levitsky
2010-08-30 10:48 ` [PATCH 2/3] MEMSTICK: add support for legacy memorysticks Maxim Levitsky
2010-09-17 23:17 ` Andrew Morton
2010-09-18 1:06 ` Maxim Levitsky
2010-09-20 19:02 ` Andrew Morton
2010-09-21 1:16 ` Alex Dubov
2010-09-21 1:25 ` Andrew Morton [this message]
2010-08-30 10:48 ` [PATCH 3/3] MEMSTICK: Add driver for Ricoh R5C592 Card reader Maxim Levitsky
2010-09-04 23:36 ` [PATCH 0/3 RESEND] My work on MemoryStick system Maxim Levitsky
2010-09-06 0:47 ` Alex Dubov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100920182537.9e0920ad.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maximlevitsky@gmail.com \
--cc=oakad@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox