Message ID | 20240221094933.36348-27-byungchul@sk.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 6870BC54764 for <linux-mm@archiver.kernel.org>; Wed, 21 Feb 2024 09:50:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B507A6B00A3; Wed, 21 Feb 2024 04:50:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A3BF36B00A4; Wed, 21 Feb 2024 04:50:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 88FCD6B00A5; Wed, 21 Feb 2024 04:50:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 649FB6B00A3 for <linux-mm@kvack.org>; Wed, 21 Feb 2024 04:50:11 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 38240A0C37 for <linux-mm@kvack.org>; Wed, 21 Feb 2024 09:50:11 +0000 (UTC) X-FDA: 81815340222.24.988C406 Received: from invmail4.hynix.com (exvmail4.skhynix.com [166.125.252.92]) by imf27.hostedemail.com (Postfix) with ESMTP id 6319840020 for <linux-mm@kvack.org>; Wed, 21 Feb 2024 09:50:09 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf27.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708509009; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=xqqn+qAGDgWMLC8XIQPZA2qY+nJKqeOAwdlRWYOfKD4=; b=ehj5GBYkw/TnPWRsvGh7s0QgJiWaCz2W6B5YwW68U0YlAiymyM+pR80rIvTqVwcOHuzPBP AulIpWdxwzvaX9LXylXDia9yKC+YV20BWebvrXDffrW4tA1vONakZZxloqAS1mtTCfAINQ MVpjpnkovIzsyyJvMgineQWICUIpl7s= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf27.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708509009; a=rsa-sha256; cv=none; b=W4TMwYrQloXLZspoBWwC9mMQd4z/CP8+Wzvt+i/FEDuR6tvdwkX4bRQ8+jyVEkyvli884x 7pASlEBOD3V523k5/qC10X8bBE6wwnK2QDYSiws/2FSR50eHLY0Qn/yGzSVLK82nDPE4tb 7ZiI7EwWBSApqc8osL1R3XhW3mtTuLs= X-AuditID: a67dfc5b-d85ff70000001748-28-65d5c73b30c9 From: Byungchul Park <byungchul@sk.com> To: linux-kernel@vger.kernel.org Cc: kernel_team@skhynix.com, torvalds@linux-foundation.org, damien.lemoal@opensource.wdc.com, linux-ide@vger.kernel.org, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, will@kernel.org, tglx@linutronix.de, rostedt@goodmis.org, joel@joelfernandes.org, sashal@kernel.org, daniel.vetter@ffwll.ch, duyuyang@gmail.com, johannes.berg@intel.com, tj@kernel.org, tytso@mit.edu, willy@infradead.org, david@fromorbit.com, amir73il@gmail.com, gregkh@linuxfoundation.org, kernel-team@lge.com, linux-mm@kvack.org, akpm@linux-foundation.org, mhocko@kernel.org, minchan@kernel.org, hannes@cmpxchg.org, vdavydov.dev@gmail.com, sj@kernel.org, jglisse@redhat.com, dennis@kernel.org, cl@linux.com, penberg@kernel.org, rientjes@google.com, vbabka@suse.cz, ngupta@vflare.org, linux-block@vger.kernel.org, josef@toxicpanda.com, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, jack@suse.cz, jlayton@kernel.org, dan.j.williams@intel.com, hch@infradead.org, djwong@kernel.org, dri-devel@lists.freedesktop.org, rodrigosiqueiramelo@gmail.com, melissa.srw@gmail.com, hamohammed.sa@gmail.com, 42.hyeyoo@gmail.com, chris.p.wilson@intel.com, gwan-gyeong.mun@intel.com, max.byungchul.park@gmail.com, boqun.feng@gmail.com, longman@redhat.com, hdanton@sina.com, her0gyugyu@gmail.com Subject: [PATCH v12 26/27] fs/jbd2: Use a weaker annotation in journal handling Date: Wed, 21 Feb 2024 18:49:32 +0900 Message-Id: <20240221094933.36348-27-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240221094933.36348-1-byungchul@sk.com> References: <20240221094933.36348-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSa0xTZxjHfd9zzntOC5WTzoSDxmhqdEYD6qLkiSGbX+aOS+ZM/MaySzdO pFmprJWbCYRLtYhAuASqQlxBUzvoQAsGBMq4hEtVoGhlWAEFUSTcNlg7uexSJH558sv/+T3/ Tw9HKZuYrZxGd07S69RaFZHT8rngivConifSwUu9QVCYexB8f2XTUF5rJ+CuqUZgr8/AMN31 Gfzun0Ww2jdAgbnEjaBifJSC+u4xBE5bJoHHk5vB41sg4Cq5TCDrRi2BwZk1DCOlRRiqHV/A g4JKDG3LUzSYpwmUmbNwYLzBsGytYsGavhsmbNdYWBs/BK6xIQac3v1w9foIgRani4buxgkM j5vKCYzZ/2PgQXcvDe7CPAZ+na8kMOO3UmD1LbDwqM2C4bYxUHRx6V8GevLaMFy8eQeD52kz gtbsFxgc9iECnb5ZDHWOEgpWbnUhmMifY+FC7jILZRn5CC5fKKVh4J8eBowjR2D1bTk5dlT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mIw m14QaHAOYagyF1AwdqMRwYDuCwsnzrpZKMzQIThz4jwNz381M6DtjQLPzyKyIlpoGBqhBG3V QaHWVUwLraW8cP/Sa1bQ1vWwQrE5VagyhgjXHjmwUDLqZARz2WkimEfzWSH7ix0Lw8+esULL BQ8tvLfr8abZO6TL9orxSo2oCl8eI42t+NBBJbv8D7U2PkbpaMwvG/lJeG4Jn96ez/qYcAv5 7m435eNALoivyvnIZCOphOJO+vPGr0+JL5jGbeSrrf9KNBfMP+xxYB/LuKV8f81V9t/oXL68 0vK34+f1bxYOMT4O4KL4rva7VC6SFqNJZShQmahJUCjjo8LUcbFpicpDYXuSEszIexrD0fG8 e+hH59p6xEmQfLIstsYuBjAKjTotoR7xEkoeKKMPei3ZXkXaYVGVtFuVGi+q69EsCS2fIVu3 TYwJ4PYrUsQ4UUwWVf9TLPGbmY6SybEDMR9HXStX9OvwytSk+efcs/T3k1Z7NAnaeUFvDovB Gvg0HD6Y8i2iaF/JV83W3DVbbLYHllWVdaYP05a3VXcuzjqS98aQrJk3RTeYkb3AX7Vol95T gza3TYRO/ZxvDMLKA98ypxrHpm9/NzF7Z0cJ6/9kTpruWEi3hlSkNMlpdawiMoRSqRV/AAj7 mKAwAwAA X-CFilter-Loop: Reflected X-Rspam-User: X-Stat-Signature: pfd3bjqet3qgy71oiiayi3sqrhbzeic3 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 6319840020 X-HE-Tag: 1708509009-115845 X-HE-Meta: U2FsdGVkX19siDInKfBH0fwRTpp1MuvUC0/oQRFNjBBcazY/EGhVoOJYIphR9t9rutV1HZOIZOrin9j+Ekl/6oNbxV4gjYizp3NOdv331YiT5BHxi81dO8ExyGaa/l4fnEjj9S1OKkoW5kWfy7oG5T7Pm0MgX0FkuLo5gmCGTM+QB+DYTwv7IYXd3H3FOqXlplP2Uy2uV2TX4OFbbGJLiNlXGFenIsUEaRNgrivLLFritmYbEVE0nDmSjhdcvbQJsIUFw2H0vndAe47BAG08k+IFC94VrKsiWJvdnF/bMJMeDfFKYPaJ4CGZn84yY8wbrK4vPdtrM2c7P367I8SwjWwUTMfjJGwPCpMGrA0RXSgm86Bf/Wb3yLHBsdyFsri5bhtiUzqVRq4HC1lYC433vEMpv+J5ksYAPuHEKx2cSFj3imZW6JD2BJwbSABIjY0BmqNOsy2FrykvVJNcIY7lnn79+TTxtXqq3SbN/rHvu0bbsH798JQNaSZ0x8ZuAvDvZ8ax1VKnkd0ZQ86xVfb892TDr9o1pnKl9n3aTw0sXvXEKICcOF9I6ulKtNQG8THDugsVAILVfgJN3ASlyAwiB4jhvWURp5RI1V/F/r0z6hj3YcZkvADUV5fN1io4bw9wrQhwVSopGSintlrQrCiy+tb0T59xWx3krLxjsc++dJl8xi43+EnjyARbOOuNAdFYcQve9xhITQxdc2XKtUIWeoEgDv9irvTBB+KqKku+7prpJQc5kBN24aFMr6/Gc7ydDkflGVH3pZYDnXCzmQM2AnyJrIUuG/DJhCtafkoeGEMUtPe/ee2Wd76CBzEyECCIJclc2zYKLQsBvffJNBVS2wAR2OJSKgeU1c/vke+YvvmbSOCtZYPGpWkysFiEvGWgysvZZGyE43gK7krBeFxzR/TedgVd3eHjNkcQ1H6slLyTsQN5/2MyAzhsSgpC/3jU7zUOAKWhyKkakkVcpjQ t5CTY6oo /92AOoOLlzpfI/VFq7EOQOhIN0J6Dlp7jCFmQsQNQkgxezStONjexFmAMIh4KXe94mvKd 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
DEPT(Dependency Tracker)
|
expand
|
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index 5f08b5fd105a..2c159a547e15 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c @@ -460,7 +460,7 @@ static int start_this_handle(journal_t *journal, handle_t *handle, read_unlock(&journal->j_state_lock); current->journal_info = handle; - rwsem_acquire_read(&journal->j_trans_commit_map, 0, 0, _THIS_IP_); + rwsem_acquire_read(&journal->j_trans_commit_map, 0, 1, _THIS_IP_); jbd2_journal_free_transaction(new_transaction); /* * Ensure that no allocations done while the transaction is open are
jbd2 journal handling code doesn't want jbd2_might_wait_for_commit() to be placed between start_this_handle() and stop_this_handle(). So it marks the region with rwsem_acquire_read() and rwsem_release(). However, the annotation is too strong for that purpose. We don't have to use more than try lock annotation for that. rwsem_acquire_read() implies: 1. might be a waiter on contention of the lock. 2. enter to the critical section of the lock. All we need in here is to act 2, not 1. So trylock version of annotation is sufficient for that purpose. Now that dept partially relies on lockdep annotaions, dept interpets rwsem_acquire_read() as a potential wait and might report a deadlock by the wait. So replaced it with trylock version of annotation. Signed-off-by: Byungchul Park <byungchul@sk.com> --- fs/jbd2/transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)