From patchwork Mon Aug 29 21:17:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 1110832 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7TLOVHg007320 for ; Mon, 29 Aug 2011 21:24:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755169Ab1H2VTv (ORCPT ); Mon, 29 Aug 2011 17:19:51 -0400 Received: from perches-mx.perches.com ([206.117.179.246]:50546 "EHLO labridge.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754412Ab1H2VTu (ORCPT ); Mon, 29 Aug 2011 17:19:50 -0400 Received: from [173.60.85.8] (account joe@perches.com HELO joe-laptop.perches.com) by labridge.com (CommuniGate Pro SMTP 5.0.14) with ESMTPA id 18078468; Mon, 29 Aug 2011 14:19:49 -0700 From: Joe Perches To: Sage Weil Cc: "David S. Miller" , ceph-devel@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/24] ceph: Remove unnecessary OOM logging messages Date: Mon, 29 Aug 2011 14:17:27 -0700 Message-Id: X-Mailer: git-send-email 1.7.6.405.gc1be0 In-Reply-To: References: Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 29 Aug 2011 21:24:33 +0000 (UTC) Removing unnecessary messages saves code and text. Site specific OOM messages are duplications of a generic MM out of memory message and aren't really useful, so just delete them. Signed-off-by: Joe Perches --- net/ceph/messenger.c | 5 +---- net/ceph/msgpool.c | 6 +----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index c340e2e..2cd6683 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -2331,11 +2331,8 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags) } else { m->front.iov_base = kmalloc(front_len, flags); } - if (m->front.iov_base == NULL) { - pr_err("msg_new can't allocate %d bytes\n", - front_len); + if (m->front.iov_base == NULL) goto out2; - } } else { m->front.iov_base = NULL; } diff --git a/net/ceph/msgpool.c b/net/ceph/msgpool.c index d5f2d97..4ac37d4 100644 --- a/net/ceph/msgpool.c +++ b/net/ceph/msgpool.c @@ -10,12 +10,8 @@ static void *alloc_fn(gfp_t gfp_mask, void *arg) { struct ceph_msgpool *pool = arg; - void *p; - p = ceph_msg_new(0, pool->front_len, gfp_mask); - if (!p) - pr_err("msgpool %s alloc failed\n", pool->name); - return p; + return ceph_msg_new(0, pool->front_len, gfp_mask); } static void free_fn(void *element, void *arg)