From patchwork Sat Jan 29 21:41:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12729652 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1AA18C433F5 for ; Sat, 29 Jan 2022 21:41:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A57BA6B0093; Sat, 29 Jan 2022 16:41:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A07656B0095; Sat, 29 Jan 2022 16:41:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8F6996B0096; Sat, 29 Jan 2022 16:41:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0076.hostedemail.com [216.40.44.76]) by kanga.kvack.org (Postfix) with ESMTP id 820096B0093 for ; Sat, 29 Jan 2022 16:41:26 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3F0F6944D6 for ; Sat, 29 Jan 2022 21:41:26 +0000 (UTC) X-FDA: 79084646172.23.4EDAD2B Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf01.hostedemail.com (Postfix) with ESMTP id E241E40002 for ; Sat, 29 Jan 2022 21:41:25 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 30A8660AFD; Sat, 29 Jan 2022 21:41:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17968C340E5; Sat, 29 Jan 2022 21:41:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1643492484; bh=bFtqr3z8tdckz/RB4dJTJ8Y293P850XkpxoA3JT6Jio=; h=Date:From:To:Subject:In-Reply-To:From; b=V8eO5Bgu7xgONhv7QxWydBEytb3aEpaUifLaEVFtI9bzwiZmHuwSPf9O0yVnolKfL ZLQ7Vmj82PaE7wUJWd/yMkJgEry1VIT81t+zN+uBoGMFkmuIIIhDo0qokk1FNjva73 hmU5mbA+rx7Nfp3jJ6Q0aA6YaN4l7xfJPtyhxqEU= Date: Sat, 29 Jan 2022 13:41:23 -0800 From: Andrew Morton To: adilger.kernel@dilger.ca, akpm@linux-foundation.org, gautham.ananthakrishna@oracle.com, gechangwei@live.cn, ghe@suse.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com, junxiao.bi@oracle.com, linux-mm@kvack.org, mark@fasheh.com, mm-commits@vger.kernel.org, piaojun@huawei.com, saeed.mirzamohammadi@oracle.com, stable@vger.kernel.org, torvalds@linux-foundation.org, tytso@mit.edu Subject: [patch 11/12] jbd2: export jbd2_journal_[grab|put]_journal_head Message-ID: <20220129214123.z8JOI6u8G%akpm@linux-foundation.org> In-Reply-To: <20220129134026.8ccf701012f26eb2c2c269c9@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: E241E40002 X-Stat-Signature: ke1jwqf9u93paddypdu8ywpwftmsmhxz X-Rspam-User: nil Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=V8eO5Bgu; spf=pass (imf01.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-HE-Tag: 1643492485-793176 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Joseph Qi Subject: jbd2: export jbd2_journal_[grab|put]_journal_head Patch series "ocfs2: fix a deadlock case". This fixes a deadlock case in ocfs2. We firstly export jbd2 symbols jbd2_journal_[grab|put]_journal_head as preparation and later use them in ocfs2 insread of jbd_[lock|unlock]_bh_journal_head to fix the deadlock. This patch (of 2): This exports symbols jbd2_journal_[grab|put]_journal_head, which will be used outside modules, e.g. ocfs2. Link: https://lkml.kernel.org/r/20220121071205.100648-2-joseph.qi@linux.alibaba.com Signed-off-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Cc: Andreas Dilger Cc: Gautham Ananthakrishna Cc: Saeed Mirzamohammadi Cc: "Theodore Ts'o" Cc: Signed-off-by: Andrew Morton --- fs/jbd2/journal.c | 2 ++ 1 file changed, 2 insertions(+) --- a/fs/jbd2/journal.c~jbd2-export-jbd2_journal__journal_head +++ a/fs/jbd2/journal.c @@ -2972,6 +2972,7 @@ struct journal_head *jbd2_journal_grab_j jbd_unlock_bh_journal_head(bh); return jh; } +EXPORT_SYMBOL(jbd2_journal_grab_journal_head); static void __journal_remove_journal_head(struct buffer_head *bh) { @@ -3024,6 +3025,7 @@ void jbd2_journal_put_journal_head(struc jbd_unlock_bh_journal_head(bh); } } +EXPORT_SYMBOL(jbd2_journal_put_journal_head); /* * Initialize jbd inode head