public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gu Zheng <guz.fnst@cn.fujitsu.com>
To: Gao feng <gaofeng@cn.fujitsu.com>
Cc: Kim <jaegeuk.kim@samsung.com>,
	f2fs <linux-f2fs-devel@lists.sourceforge.net>,
	fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] f2fs: introduce f2fs_kmem_cache_alloc to hide the unfailed kmem cache allocation
Date: Tue, 22 Oct 2013 13:30:34 +0800	[thread overview]
Message-ID: <52660D7A.9070007@cn.fujitsu.com> (raw)
In-Reply-To: <5265F5E6.3000604@cn.fujitsu.com>

On 10/22/2013 11:49 AM, Gao feng wrote:

> On 10/21/2013 03:24 PM, Gu Zheng wrote:
>> +static inline void *f2fs_kmem_cache_alloc(struct kmem_cache *cachep,
>> +						gfp_t flags)
>> +{
>> +	void *entry = kmem_cache_alloc(cachep, flags);
>> +retry:
> 
> retry after kmem_cache_alloc?

Oh~, stupid mistake, thanks for your reminder.:)

> 
>> +	if (!entry) {
>> +		cond_resched();
>> +		goto retry;
>> +	}
>> +
>> +	return entry;
>> +}
> 
> --
> 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/
> 



      parent reply	other threads:[~2013-10-22  5:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-21  7:24 [PATCH] f2fs: introduce f2fs_kmem_cache_alloc to hide the unfailed kmem cache allocation Gu Zheng
2013-10-22  2:45 ` Haicheng Li
2013-10-22  5:17   ` Haicheng Li
2013-10-22  3:49 ` Gao feng
2013-10-22  5:16   ` Haicheng Li
2013-10-22  5:34     ` Gu Zheng
2013-10-22  6:15       ` Haicheng Li
2013-10-22  6:26         ` Gu Zheng
2013-10-22  5:30   ` Gu Zheng [this message]

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=52660D7A.9070007@cn.fujitsu.com \
    --to=guz.fnst@cn.fujitsu.com \
    --cc=gaofeng@cn.fujitsu.com \
    --cc=jaegeuk.kim@samsung.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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