Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753408AbdHTSiw (ORCPT ); Sun, 20 Aug 2017 14:38:52 -0400 Received: from mout.web.de ([217.72.192.78]:53088 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753304AbdHTSiu (ORCPT ); Sun, 20 Aug 2017 14:38:50 -0400 Subject: [PATCH 1/3] ceph: Delete an error message for a failed memory allocation in __get_or_create_frag() From: SF Markus Elfring To: ceph-devel@vger.kernel.org, Ilya Dryomov , Sage Weil , "Yan, Zheng" Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <1c62414e-f9c9-3c3b-a6d3-cd1ea582939a@users.sourceforge.net> Date: Sun, 20 Aug 2017 20:38:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:j+2DPiOK5KuvcclKPgZEdNy4B/ZmbNHTg8RuLYO6+328uIfCyDl xyqC8TVPUSU9AUNh5myTwRG2PNY2CdGQmdvA8FqHthp3p69pA7hbZUzR0a+oxBnfLaYwrmz IqBKbLMRJd1maCrqGDNZn88ulCSQotH5uNlSePvG60ijR3eRRqM03sTI/FUUKmkLV+LgKSy V2czCvEqYWgNSpMad8usw== X-UI-Out-Filterresults: notjunk:1;V01:K0:eDYFdfci4uM=:EjUA1RN1MZY7UklSH4BBN9 IoDEGkJYpkti0PFW/XVVS025WOwQwEktW7fAjvrg82MUnVmz1+kjBPN8iq9c53csobGcxtmUJ X1syZFXItWbbpZ/gPAgKykoO0qz2nfIq9zKLa5beFTizjamQ8zol+CQIgc7DPV1GK5vl+tDN4 Ro7kHyFEuHGy/9aBQKr+YRfRB3r892Z6GgPD7mu3ovPsW3DyBmX9O2M0asHL+1AQBZ0iIXDhu yxRalolcYv5eiMua4xRhLV42PYyOs2U6v4gfQbgDfnwGcHiPdUkA0GGhK/JWQa06DG4qf5hVp bnws26/OPZQBCHyHOZz1G3eAu9lKpAEUidjBs5AAT91zuER/SDcY86YbUJ7nZ3KqrmsDRug8b PF1P9pUPWhlL1sMMeh9Rf+EV91Y0Zk9EA9xMmN0rec7Qt+X/pu/NgOx3jsTnxd3NiHuO3/+Tz 7XoIfXT/MtVjH2OWzGdO7xbL7XO1bKHd2jfAwhawnU0AfdFlzL2urGfcNNhLSzhgqX9gSBtuu 46etWkkM61lQvKY5b3e6L7CpsLSdBPmnoqQPfIa2J8eCfw1KscJd/ZVWuZ3NANQS+TxXKOs06 iZIcY2HH7Kx++B76HRKrx4ss/Mz9Us0ZpGZU7fmFIw848iKd6yuuOeAlEq01N2WE+fFjSg0q9 wdNn2uOjgFzI00urKEsFS8T5yMsIPvWQxqIg0Zw18NxANL+ClglhrVXBbU5U8x+D3QqvhukuV csBth0fQeaQ3UVsHniQvq47XmbHnqr+UbcCEZ1k3eq2jOQl00uF8/cLTNKIQ1Dcy/HKXI3Pp6 3L73IWrsL/gb/b9I0pd+rbnEOGCqQ8fQUIXjFpeTux5og7XPYY= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 919 Lines: 33 From: Markus Elfring Date: Sun, 20 Aug 2017 20:00:09 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- fs/ceph/inode.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 220dfd87cbfa..010e7be768e6 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -133,12 +133,9 @@ static struct ceph_inode_frag *__get_or_create_frag(struct ceph_inode_info *ci, } frag = kmalloc(sizeof(*frag), GFP_NOFS); - if (!frag) { - pr_err("__get_or_create_frag ENOMEM on %p %llx.%llx " - "frag %x\n", &ci->vfs_inode, - ceph_vinop(&ci->vfs_inode), f); + if (!frag) return ERR_PTR(-ENOMEM); - } + frag->frag = f; frag->split_by = 0; frag->mds = -1; -- 2.14.0