linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Jan Harkes <jaharkes@cs.cmu.edu>, coda@cs.cmu.edu
Cc: codalist@TELEMANN.coda.cs.cmu.edu, linux-kernel@vger.kernel.org
Subject: [PATCH 1/4] coda: Remove unnecessary OOM messages
Date: Tue, 31 Jan 2012 14:42:07 -0800	[thread overview]
Message-ID: <db4ffce1e5a8a3a6e54e7a4f6487e822709dbdba.1328049542.git.joe@perches.com> (raw)
In-Reply-To: <cover.1328049542.git.joe@perches.com>

Per call site OOM messages are unnecessary.
k.alloc and v.alloc failures use dump_stack().

Signed-off-by: Joe Perches <joe@perches.com>
---
 fs/coda/coda_linux.h |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/fs/coda/coda_linux.h b/fs/coda/coda_linux.h
index cc0ea9f..7b2c3a1 100644
--- a/fs/coda/coda_linux.h
+++ b/fs/coda/coda_linux.h
@@ -57,13 +57,12 @@ unsigned short coda_flags_to_cflags(unsigned short);
 void coda_sysctl_init(void);
 void coda_sysctl_clean(void);
 
-#define CODA_ALLOC(ptr, cast, size) do { \
-    if (size < PAGE_SIZE) \
-        ptr = kzalloc((unsigned long) size, GFP_KERNEL); \
-    else \
-        ptr = (cast)vzalloc((unsigned long) size); \
-    if (!ptr) \
-        printk("kernel malloc returns 0 at %s:%d\n", __FILE__, __LINE__); \
+#define CODA_ALLOC(ptr, cast, size)			\
+do {							\
+	if (size < PAGE_SIZE)				\
+		ptr = kzalloc(size, GFP_KERNEL);	\
+	else						\
+		ptr = vzalloc(size);			\
 } while (0)
 
 
-- 
1.7.8.111.gad25c.dirty


  reply	other threads:[~2012-01-31 22:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-31 22:42 [PATCH 0/4] fs: Remove unnecessary OOM messages Joe Perches
2012-01-31 22:42 ` Joe Perches [this message]
2012-02-01  0:04   ` [PATCH 1/4] coda: " Ryan Mallon
2012-02-01  0:21     ` Joe Perches
2012-02-01  0:23       ` Ryan Mallon
2012-02-01  0:26         ` Joe Perches
2012-02-01  3:10           ` Jan Harkes
2012-02-01  3:42             ` Joe Perches
2012-01-31 22:42 ` [PATCH 2/4] jffs2: " Joe Perches
2012-02-03  7:00   ` Artem Bityutskiy
2012-01-31 22:42 ` [PATCH 3/4] reiserfs: " Joe Perches
2012-01-31 22:42 ` [PATCH 4/4] udf: " Joe Perches
2012-02-01 11:28   ` Jan Kara

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=db4ffce1e5a8a3a6e54e7a4f6487e822709dbdba.1328049542.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=coda@cs.cmu.edu \
    --cc=codalist@TELEMANN.coda.cs.cmu.edu \
    --cc=jaharkes@cs.cmu.edu \
    --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;
as well as URLs for NNTP newsgroup(s).