linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Liu <jeff.liu@oracle.com>
To: Pekka Enberg <penberg@kernel.org>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	Christoph Lameter <cl@linux-foundation.org>,
	Matt Mackall <mpm@selenic.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] slub: correct return errno on slab_sysfs_init failure
Date: Sat, 14 Jun 2014 15:44:30 +0800	[thread overview]
Message-ID: <539BFD5E.4060907@oracle.com> (raw)
In-Reply-To: <CAOJsxLFyNZ9dc5T7282eqsg6gPtST75_h-5iGLX=t6OsWAPSCw@mail.gmail.com>


On 06/13/2014 14:57 PM, Pekka Enberg wrote:
> On Thu, Jun 12, 2014 at 3:56 PM, Jeff Liu <jeff.liu@oracle.com> wrote:
>> From: Jie Liu <jeff.liu@oracle.com>
>>
>> Return ENOMEM instead of ENOSYS if slab_sysfs_init() failed
>>
>> Signed-off-by: Jie Liu <jeff.liu@oracle.com>
>> ---
>>  mm/slub.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/mm/slub.c b/mm/slub.c
>> index 2b1ce69..75ca109 100644
>> --- a/mm/slub.c
>> +++ b/mm/slub.c
>> @@ -5304,7 +5304,7 @@ static int __init slab_sysfs_init(void)
>>         if (!slab_kset) {
>>                 mutex_unlock(&slab_mutex);
>>                 printk(KERN_ERR "Cannot register slab subsystem.\n");
>> -               return -ENOSYS;
>> +               return -ENOMEM;
> 
> What is the motivation for this change? AFAICT, kset_create_and_add()
> can fail for other reasons than ENOMEM, no?

Originally I'd like to make it consistent to most other subsystems which are
return ENOMEM in case of sysfs init failed, but yes, kset_register() can fail
due to different reaons...


Cheers,
-Jeff

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2014-06-14  7:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-12 12:56 Jeff Liu
2014-06-13  6:57 ` Pekka Enberg
2014-06-14  7:44   ` Jeff Liu [this message]
2014-06-13 15:53 ` Christoph Lameter
2014-06-14  7:46   ` Jeff Liu
2014-06-16 14:00     ` Christoph Lameter
2014-06-16 14:59       ` Jeff Liu
2014-06-16 15:25         ` Christoph Lameter
2014-06-16 15:31           ` Jeff Liu

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=539BFD5E.4060907@oracle.com \
    --to=jeff.liu@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mpm@selenic.com \
    --cc=penberg@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