Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2003028rwb; Fri, 2 Dec 2022 04:19:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf5nomR2uLpXt296jWbhroHkFJu5+lJtqulY6uIzMx2h2qIhkY6HDqBute85VL+Fm2UFF1B8 X-Received: by 2002:a63:4b41:0:b0:477:fbed:369b with SMTP id k1-20020a634b41000000b00477fbed369bmr27432838pgl.57.1669983543213; Fri, 02 Dec 2022 04:19:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669983543; cv=none; d=google.com; s=arc-20160816; b=V3LMi2aMiiltMI7pXNMqor0cjfaI4TnkUzl7oFXi6G47GzWJWRCCRlxoJkAYJU8YKH fvPlt9Y0bkbHCYNDJe0nGljP5wfSWXBQktR+Pz827YnlysvowpKiVzBTnghSULbRmcN5 qh2rtS+El8F6A5Dw+fG3Q5/M3Il9+6vfLkbyjG/IqrSSiSSTjjOu41Iq6BCzIsE9YMtb bm8Gl3sfL4DkitkSkPsGoiJ9aWDnczi6EAMrjGDugjR4aeiIB/rw3lJbfZZWhLQinfSX VYtEu5wHVpfQ26lAyWlJFgzuPAZHjNkT+e7VdTyk93FBQ1aoLGvH+12F10R7JmT5VcKx z0sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Ha/pnWpmCN4U/dhNkQWRAml/R07xL0rfPwqlb/e/+Dw=; b=kZnhWDJYh2T16LZV4Rm7N8w8b3dZb3H99Lu9sfUdkKXy9femsmhqXOXO0fdUymDDWW Z9UBDqevCe1p8+qyoUW/DZrVAveprlx8GOwRUMVVyXsEfkuUAOXJq0ISp/AtODq+corH 9oc3DSAyd9X/d6QLSPZq7pX6nIJVbb4LPvSVCo2zPcTqVJFcUOhkVlidNC8ofuUJ1Rfo DlPrdQ3a9Wf/rkLN2Ic0OYt4+P8bB2xg53l4Oex/j0riv9f25dj9roIFfWQCpcTIDoqP xX/gjGgqGAVZreZdXdvBVT13PMFL2CSWvirECRilMbzQpNoQVo5Z9nyTUfyOIMhLXAS0 GNKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DoAeT+gj; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x22-20020a170902821600b00189bdfb4710si889731pln.280.2022.12.02.04.18.31; Fri, 02 Dec 2022 04:19:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DoAeT+gj; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232517AbiLBMNJ (ORCPT + 99 others); Fri, 2 Dec 2022 07:13:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233094AbiLBMNH (ORCPT ); Fri, 2 Dec 2022 07:13:07 -0500 X-Greylist: delayed 525 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 02 Dec 2022 04:13:06 PST Received: from out-64.mta0.migadu.com (out-64.mta0.migadu.com [IPv6:2001:41d0:1004:224b::40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 093852CDD7 for ; Fri, 2 Dec 2022 04:13:05 -0800 (PST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1669982658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Ha/pnWpmCN4U/dhNkQWRAml/R07xL0rfPwqlb/e/+Dw=; b=DoAeT+gjiMzofj1ovIt+8/IlEyI/vo8dEXYM8T3B+IIqZg44vRTjJ8RIu2eaNSrgyztpq4 Be72Fmurf5mfTM+dBeEU3ToIF+YqeA+YoAr6/6uiWqaGuQYI6W6fs1EKWGAMHqitplcZyV CEKmbvWi7/4dy6w60cBvNqyJzpjsVlQ= From: Guoqing Jiang To: tytso@mit.edu, adilger.kernel@dilger.ca Cc: linux-ext4@vger.kernel.org, ojaswin@linux.ibm.com Subject: [PATCH V2] ext4: make ext4_mb_initialize_context return void Date: Fri, 2 Dec 2022 20:04:09 +0800 Message-Id: <20221202120409.24098-1-guoqing.jiang@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Change the return type to void since it always return 0, and no need to do the checking in ext4_mb_new_blocks. Signed-off-by: Guoqing Jiang Reviewed-by: Ojaswin Mujoo --- V2 changes: 1. collect tag from Ojaswin, thanks! fs/ext4/mballoc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 9dad93059945..5b2ae37a8b80 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -5204,7 +5204,7 @@ static void ext4_mb_group_or_file(struct ext4_allocation_context *ac) mutex_lock(&ac->ac_lg->lg_mutex); } -static noinline_for_stack int +static noinline_for_stack void ext4_mb_initialize_context(struct ext4_allocation_context *ac, struct ext4_allocation_request *ar) { @@ -5253,8 +5253,6 @@ ext4_mb_initialize_context(struct ext4_allocation_context *ac, (unsigned) ar->lleft, (unsigned) ar->pleft, (unsigned) ar->lright, (unsigned) ar->pright, inode_is_open_for_write(ar->inode) ? "" : "non-"); - return 0; - } static noinline_for_stack void @@ -5591,11 +5589,7 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle, goto out; } - *errp = ext4_mb_initialize_context(ac, ar); - if (*errp) { - ar->len = 0; - goto out; - } + ext4_mb_initialize_context(ac, ar); ac->ac_op = EXT4_MB_HISTORY_PREALLOC; seq = this_cpu_read(discard_pa_seq); -- 2.35.3