Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1023460pxj; Thu, 17 Jun 2021 20:29:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyTbpj+E+t4GaU3BbsK02ZFqtv5om8Q/cQSIGw40EhONbr8MCQ9dJOjZT10qfeKfiwgl+J X-Received: by 2002:aa7:c40f:: with SMTP id j15mr2015275edq.169.1623986963644; Thu, 17 Jun 2021 20:29:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623986963; cv=none; d=google.com; s=arc-20160816; b=WVsPia42k96IYeYSqhPuQHCMBgsR2v+KuVTr+snmyU5k3tZ1+HSZ8oooUWVx/GisVx E82M715lUSdqGOcpjhWWTW5gdZ02YFBVzFhhbkuY0KjU5wyiQxkjdUXTLQpJ/M5Vi+Fr 56lLpcyacJxvkIfXUj+r2W0yWHhqPOCMDol+97W4RAEsZGU7dnNiv0larI7+s9HaiOdg oyVaRHAGNT1RyQpN434GMj221nS4d+XisOXMIhhJVatk844LO5nK48tLmL5ERAh1M1sh hj8x7Cbm3HYQ8g3tsHlYuEkDF1lZTHPbIum448qClus6Ss0ZL/OhtnHcv++vfwqrmgDf E4Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=iWKK79KB4GxgnERIfBqEybUk9eie6t2AyB0hpOwHeSg=; b=gkwNtaVGINfVk3QvR0DrhC4hzTuP9UZdStkw7d+UzsBNBKcJ6+3Uo4z2SB7dajJ28c AUaeJHKcdysUX96lLehMsXhj11787UudLOzVx5O9gVRFR+ivsZjs2IwcNfaezaAgvMB8 3Y7oPq3ThDI+Zdye5FlB3c4vBQw73rZ3k2l3/lntDOfiQvKOmRzLLqIW7itWgWPDIDVm VfGZR1Fym+QkwsuhkCrShzN05eDahPApf34alt3dxhR5x5DSkU8lxoveZrLbD3Pp0E3m hM4QG7NsONftymRMkYIRklMwfwIFJyaKBYNocA60Xec1lSozAimpTW/DTLGDA5RUdCPf CWGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ka11si1172400ejc.367.2021.06.17.20.29.00; Thu, 17 Jun 2021 20:29:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233527AbhFRBWr (ORCPT + 99 others); Thu, 17 Jun 2021 21:22:47 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:4961 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232000AbhFRBWq (ORCPT ); Thu, 17 Jun 2021 21:22:46 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4G5gyF1XH7z6yLJ; Fri, 18 Jun 2021 09:17:25 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 18 Jun 2021 09:20:36 +0800 Received: from [127.0.0.1] (10.174.179.0) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 18 Jun 2021 09:20:35 +0800 Subject: Re: [PATCH 1/1] quota: remove unnecessary oom message To: Jan Kara CC: Jan Kara , linux-kernel References: <20210617091627.1653-1-thunder.leizhen@huawei.com> <20210617150116.GG32587@quack2.suse.cz> From: "Leizhen (ThunderTown)" Message-ID: Date: Fri, 18 Jun 2021 09:20:34 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20210617150116.GG32587@quack2.suse.cz> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.179.0] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/6/17 23:01, Jan Kara wrote: > On Thu 17-06-21 17:16:27, Zhen Lei wrote: >> Fixes scripts/checkpatch.pl warning: >> WARNING: Possible unnecessary 'out of memory' message >> >> Remove it can help us save a bit of memory. >> >> Signed-off-by: Zhen Lei > > I agree the message is pointless. But when doing this, I guess we can just > get rid of getdqbuf() altogether and instead call kmalloc() directly in all > the places. OK, I will get rid of it in v2. > > Honza > >> diff --git a/fs/quota/quota_tree.c b/fs/quota/quota_tree.c >> index c5562c871c8b..b097d02bad94 100644 >> --- a/fs/quota/quota_tree.c >> +++ b/fs/quota/quota_tree.c >> @@ -49,11 +49,7 @@ static int qtree_dqstr_in_blk(struct qtree_mem_dqinfo *info) >> >> static char *getdqbuf(size_t size) >> { >> - char *buf = kmalloc(size, GFP_NOFS); >> - if (!buf) >> - printk(KERN_WARNING >> - "VFS: Not enough memory for quota buffers.\n"); >> - return buf; >> + return kmalloc(size, GFP_NOFS); >> } >> >> static ssize_t read_blk(struct qtree_mem_dqinfo *info, uint blk, char *buf) >> -- >> 2.25.1 >> >>