Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp1691227ybs; Tue, 26 May 2020 00:56:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMbMhWbPBlNuB6tQp5o51Gh6Q1lIZEkYdPV+SwrDINQdFAshOn4VLJw80jb0bB2JeMqZTa X-Received: by 2002:a50:ee8e:: with SMTP id f14mr18343162edr.115.1590479809021; Tue, 26 May 2020 00:56:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590479809; cv=none; d=google.com; s=arc-20160816; b=pYbBFlsicD6JeUfN/qH+ZG9lxF07EWYgNDo/JDUEFQkTDiVVbnZEC3MavuDnwq6RXn cvU9Sm3yJ5Im2EUCjSlf3X6yWhQwCCCpoJmJ/NSkxFcCP/9M3FmZJhIxmhg25KbXDbzc k4QZph2U5R1+QRc47rbDpaUzkYQpVHSsqdlLxqLAU4SeVMh79pHNUAfY/CyUNZLbxKJ3 K15nEPT18Se8u9jBRVcg1Zzjc/v2fM/y/yA1cEefv2kje/yljReSR7NrYAwArxwc1sX+ WE1Pun9KenaXkydIXk11MyZZkLE6XgyDh6JoTDlC0JqMIvvHvFCd33HLFgnQ6O39FIWy BpRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mgKmCFP159Cz3LE0++7eT0wMT8fmneEk2r3AYh9a6Jo=; b=Jp243od2x+RVQgCtNXIWh9YjCdixadZ4yklTiD5De+7zNPgUilaip6GLRYw8mVN1In FbWdrotH338axlzQ4XVhgC7PViX6v+hWU6i9PUPjI4/HadDrN3bwOp0jQYYsx1g+D74r ZX5p7O333mJNpU2aa+Kp2j/5d4mCnHKhoFVl+bQlq3LSUPF3pSbcUzaEwJScdYx7pbzN 8YZc2Y6yH8CrdC5dqeR0kxnEjrbMkh8ZnVSKbC4VDYMB2nGTYvRrCiLIEFslsAu7x4nH BuPOEmtMt/mAXIUHdFz0OjoSVbk0UEi/LgrTKlgUTJURpVJNZYFbPAed+1/Y4l+POxFH LVHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-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 q12si10997842edn.500.2020.05.26.00.56.26; Tue, 26 May 2020 00:56:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726761AbgEZHTX (ORCPT + 99 others); Tue, 26 May 2020 03:19:23 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5335 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730430AbgEZHTW (ORCPT ); Tue, 26 May 2020 03:19:22 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 0CA94D9F7D1941A1AC8D; Tue, 26 May 2020 15:19:20 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Tue, 26 May 2020 15:19:11 +0800 From: "zhangyi (F)" To: CC: , , , , Subject: [PATCH 10/10] ext4: remove unused parameter in jbd2_journal_try_to_free_buffers() Date: Tue, 26 May 2020 15:17:54 +0800 Message-ID: <20200526071754.33819-11-yi.zhang@huawei.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200526071754.33819-1-yi.zhang@huawei.com> References: <20200526071754.33819-1-yi.zhang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org gfp_mask in jbd2_journal_try_to_free_buffers() is no longer used after commit 536fc240e7147 ("jbd2: clean up jbd2_journal_try_to_free_buffers()"), just remove it. Signed-off-by: zhangyi (F) --- fs/ext4/inode.c | 2 +- fs/ext4/super.c | 4 ++-- fs/jbd2/transaction.c | 7 +------ include/linux/jbd2.h | 3 ++- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 7354edb444c5..8adde60c9b02 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3293,7 +3293,7 @@ static int ext4_releasepage(struct page *page, gfp_t wait) if (PageChecked(page)) return 0; if (journal) - return jbd2_journal_try_to_free_buffers(journal, page, wait); + return jbd2_journal_try_to_free_buffers(journal, page); else return try_to_free_buffers(page); } diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 1e15179aa1c4..8a84f52fd67c 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1394,8 +1394,8 @@ static int bdev_try_to_free_page(struct super_block *sb, struct page *page, if (!page_has_buffers(page)) return 0; if (journal) - return jbd2_journal_try_to_free_buffers(journal, page, - wait & ~__GFP_DIRECT_RECLAIM); + return jbd2_journal_try_to_free_buffers(journal, page); + return bdev_try_to_free_buffer(sb, page); } diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index ac6a077afec3..c3ecefdb3abd 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c @@ -2070,10 +2070,6 @@ __journal_try_to_free_buffer(journal_t *journal, struct buffer_head *bh) * int jbd2_journal_try_to_free_buffers() - try to free page buffers. * @journal: journal for operation * @page: to try and free - * @gfp_mask: we use the mask to detect how hard should we try to release - * buffers. If __GFP_DIRECT_RECLAIM and __GFP_FS is set, we wait for commit - * code to release the buffers. - * * * For all the buffers on this page, * if they are fully written out ordered data, move them onto BUF_CLEAN @@ -2104,8 +2100,7 @@ __journal_try_to_free_buffer(journal_t *journal, struct buffer_head *bh) * * Return 0 on failure, 1 on success */ -int jbd2_journal_try_to_free_buffers(journal_t *journal, - struct page *page, gfp_t gfp_mask) +int jbd2_journal_try_to_free_buffers(journal_t *journal, struct page *page) { struct buffer_head *head; struct buffer_head *bh; diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index f613d8529863..230bb7767180 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h @@ -1376,7 +1376,8 @@ extern int jbd2_journal_dirty_metadata (handle_t *, struct buffer_head *); extern int jbd2_journal_forget (handle_t *, struct buffer_head *); extern int jbd2_journal_invalidatepage(journal_t *, struct page *, unsigned int, unsigned int); -extern int jbd2_journal_try_to_free_buffers(journal_t *, struct page *, gfp_t); +extern int jbd2_journal_try_to_free_buffers(journal_t *journal, + struct page *page); extern int jbd2_journal_stop(handle_t *); extern int jbd2_journal_flush (journal_t *); extern void jbd2_journal_lock_updates (journal_t *); -- 2.21.3