Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp583951pxj; Thu, 17 Jun 2021 09:10:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7XB/eqVMIwFpIiB4l8Se76uJ4dAfBvu04clvlQw1HdDnR37dxyOe5PBmNTztGS1QaXY1H X-Received: by 2002:a50:bf0f:: with SMTP id f15mr7487773edk.205.1623946251698; Thu, 17 Jun 2021 09:10:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623946251; cv=none; d=google.com; s=arc-20160816; b=Se2MFcDI4VYb/UO3BmkBUuJ/f9wT0ZM5MPka8+ftp+Tgi7r3waZopk8LOfygTRcjLv 7rxCONHdzWrBHNbAqtLcUOE6pPSmMYWOh2yvpWuw6rpSx9aO/9YNCKV3BhNEtAaeoD9M 9J5mE1yfhqDCeJVjEti+xnAhfqOXZkuE1e3XhL7wWR0G6t9stqevt4uevRSkZRaPdx+/ R24bfTeWNkoHyRuOpciMQ5jLz6NZVbRNbUg605m5h9FLHApy6Oiw6H0MnbCNKb99m/9X czj0ifTuNeyq3xU122riYbdDipllcgho9Cex3/p2H+2G2pzhOvFhZe+PJvEpuwMpY9u4 iXlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=ELgBROHwzhnT6WgLwbTbyP1umLLFuCti0UzM0hHAy+c=; b=Lzd4Oi3ZRwnIne6dm0vZQVAT0SfrIXSrO1TcjLtVN72Z0i5GRVpBHQD0lFHruVbMd1 N82TEae88fhZ3F6cgA7tQ8j08OA/jdfK6104l0KydBa2jvl6XktwN+do+32zJ7bOh0WS SkqoyF1ld/Q8DC7tRkm01TMMz2xb0ehl8u65GpccUFGXyCI+ntYiyV+0Cg56mBWNa32M VZNrAaClb28rwdgcIpWQjUDK2OXI5iTl3JGthSHt+rEAv13uI2LbM/kHt5fGp6xtOBXF LhwKWmUbRWhUF07Ds0cjQa6NCUKqJM7KhTIid4VqWTIENdb6nChakF857Er7pTBec2to WJFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=T97VfTRa; dkim=neutral (no key) header.i=@suse.cz; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ci1si5384575ejc.275.2021.06.17.09.10.28; Thu, 17 Jun 2021 09:10:51 -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; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=T97VfTRa; dkim=neutral (no key) header.i=@suse.cz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232221AbhFQPDZ (ORCPT + 99 others); Thu, 17 Jun 2021 11:03:25 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:51514 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230507AbhFQPDZ (ORCPT ); Thu, 17 Jun 2021 11:03:25 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id F1A5921AC2; Thu, 17 Jun 2021 15:01:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1623942076; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ELgBROHwzhnT6WgLwbTbyP1umLLFuCti0UzM0hHAy+c=; b=T97VfTRaJYf/rir3j7QDFCrvLiC+COB6EUl4rthEHx7o5aqcWGSVb6RqEONqKw0mCSELr1 vULSe1f7Bah/kKeroK9qvftSz/cGHqK0GZhjgwDQOW+QN4Q2Cq3MtXEQb+Q23ltoQl/gNj 4AB1rKYsz+g6sX+Y9ujbX4qo26rFJJk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1623942076; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ELgBROHwzhnT6WgLwbTbyP1umLLFuCti0UzM0hHAy+c=; b=pDD+JdAnPYG6yMGG1OPW4t7Mny4KL5+XWbJj8O+V6US14ES+uo4QM3iMx3sOdNN33zSFVo INhTz7OyTx3QoPBA== Received: from quack2.suse.cz (unknown [10.100.200.198]) by relay2.suse.de (Postfix) with ESMTP id E6398A3BB8; Thu, 17 Jun 2021 15:01:16 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id C48A51F2C68; Thu, 17 Jun 2021 17:01:16 +0200 (CEST) Date: Thu, 17 Jun 2021 17:01:16 +0200 From: Jan Kara To: Zhen Lei Cc: Jan Kara , linux-kernel Subject: Re: [PATCH 1/1] quota: remove unnecessary oom message Message-ID: <20210617150116.GG32587@quack2.suse.cz> References: <20210617091627.1653-1-thunder.leizhen@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210617091627.1653-1-thunder.leizhen@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 > > -- Jan Kara SUSE Labs, CR