linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Shaohua Li <shaohua.li@intel.com>
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, penberg@cs.helsinki.fi
Subject: [PATCH] mmotm: slqb correctly return value for notification handler
Date: Fri, 7 Aug 2009 11:23:45 +0800	[thread overview]
Message-ID: <20090807032345.GA15686@sli10-desk.sh.intel.com> (raw)

Correctly return value for notification handler. The bug causes other
handlers are ignored and panic kernel.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
---
 mm/slqb.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Index: mmotm/mm/slqb.c
===================================================================
--- mmotm.orig/mm/slqb.c	2009-08-07 11:14:39.000000000 +0800
+++ mmotm/mm/slqb.c	2009-08-07 11:17:36.000000000 +0800
@@ -2846,7 +2846,10 @@ static int slab_memory_callback(struct n
 		break;
 	}
 
-	ret = notifier_from_errno(ret);
+	if (ret)
+		ret = notifier_from_errno(ret);
+	else
+		ret = NOTIFY_OK;
 	return ret;
 }
 

--
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:[~2009-08-07  3:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-07  3:23 Shaohua Li [this message]
2009-08-10  6:42 ` Pekka Enberg

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=20090807032345.GA15686@sli10-desk.sh.intel.com \
    --to=shaohua.li@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@cs.helsinki.fi \
    /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