Message ID | 20240306085513.41482-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 19B55C54E49 for <linux-mm@archiver.kernel.org>; Wed, 6 Mar 2024 08:56:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6BECA6B00A8; Wed, 6 Mar 2024 03:55:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 647216B00A9; Wed, 6 Mar 2024 03:55:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 44D6D6B00AA; Wed, 6 Mar 2024 03:55:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 288516B00A8 for <linux-mm@kvack.org>; Wed, 6 Mar 2024 03:55:51 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 01E90120A83 for <linux-mm@kvack.org>; Wed, 6 Mar 2024 08:55:50 +0000 (UTC) X-FDA: 81866006502.23.142B2F3 Received: from invmail4.hynix.com (exvmail4.skhynix.com [166.125.252.92]) by imf06.hostedemail.com (Postfix) with ESMTP id 1A8B1180004 for <linux-mm@kvack.org>; Wed, 6 Mar 2024 08:55:48 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=none; spf=pass (imf06.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709715349; 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=Wfc2ebjuRC53v4YLUf3dW5Fdo1uduY6rQeJh+pNtxVn3D73K2nbYMY/q+j64+Xztm7zneB hwwGpzNVMcWoxxhE1ck6iwIXApouXp8mSTvk9judqxqlXHzI1ojYIF6i1m5VWevIiVupEK TpxxX8qz4fU9FRVB14EwztjxGeSAYgM= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709715349; a=rsa-sha256; cv=none; b=yuFnik/ZbKIPbAqm96fztyZJAsf3uzeWWpqaXoctRTvUulDVKBCsQaRStMm6J/2wmk9WoY PeJh9Z8S3LKnmNS5QS1ZOyRHU+L+abP2zii8CQP2bYxxbKQq/m3glJahvWVFpRnUubPk/7 GBsc4v69Nqhph5nTIxxP6JbWplf2/mI= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=none; spf=pass (imf06.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com; dmarc=none X-AuditID: a67dfc5b-d85ff70000001748-ca-65e82f7ffbf2 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, 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 v13 26/27] fs/jbd2: Use a weaker annotation in journal handling Date: Wed, 6 Mar 2024 17:55:12 +0900 Message-Id: <20240306085513.41482-27-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240306085513.41482-1-byungchul@sk.com> References: <20240306085513.41482-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzXSa2yLYRQHcM/zXlurvKklXpMgFffYRUzOEqRCeHwQQnwhQWNvrHQjHbsI yVgtdDpDdrENu6lmF5eOmMsutnQ3NmOzbjPDUmbRbWxaujVoJ76c/HLO/5xPh6eUD5ggXhtz TNLHaHQqVk7LhwMKVySFfJFCi20BcOlCKLh+nKMh704ZC+23SxGU3T+NYci2GexuJ4LJ1pcU ZGW0Iyj4+I6C+w39CKosZ1jocMyATtcoC80ZqSwkF91h4dVXL4a+zMsYSq1b4Xl6IYZazyAN WUMs5GYlY1/5gsFjLuHAnLQQBiw5HHg/hkFzfxcDVb3L4er1PhaeVjXT0FA5gKHjcR4L/WV/ GHje0ERD+yUTA+UjhSx8dZspMLtGOXhdm4/hrsF3KGX8NwONploMKcX3MHT2PEFQfe4DBmtZ Fwv1LieGCmsGBRO3bAgG0oY5OHvBw0Hu6TQEqWczaTD0hcPkrzxWHUHqnaMUMVTEkyp3P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yFg8qEdwcCNUQYuX/cykHfxBoLMy3dIyOhVwtTPfDpsE9/gchN8RtVZ vmaikOSbijn+6b0+hs942c3whbZEvsocyD94MYL5onEPxdtKr9G8bfw2wxtGOzA/1tLC8G/u TpH8YIcRh/sfk2w5IcSqkwTt2q1Rkujyr21E/MTc5CZ7LdKjSbEBiUUcu4GrNZgIn2l2Jffh g3fWcnY5V5X1jfKZYF0SrqRlp88L2AOc4ZMB+0yyAZy7yzB7L2U3clndduZf5zLOUlk3m4tn 8ptjN2mfZaySe5teRN9CkkI0pxTJ1XFJGpU6Vhmsi4lOiVMnBx8/rbGhmXcxpU5nV6Mf7bvq EStCinnSMPGQIKNUSboUTT3iRIRCLr0wOSjIpCdUKecE7elIbWKsoKtH/iJSsUi6+4gQJWNP qhKEGEGIF7T/t1gk9tMj0O85vsomL4p4FBLUHOSKdJCagoPb/kQSqdfeL+v6tSTi83BqpN9o eOjCw0PygEnv0epM2fkC5871/atze0rKTgU83P1scXlt4N7gHmeP9Mw35b7H9vDxV8mOsM1a sdJxeAFLLLW05QqOxB3mR5oovXPRuuQV7u3nnt6F0UPB5jQFqYtWhQYSWp3qL1XXE88qAwAA X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 1A8B1180004 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 6imcebsiwpxbtk4xixwbf4zog5ckt813 X-HE-Tag: 1709715348-851749 X-HE-Meta: U2FsdGVkX1+G+awIGvFXzXRhvK9K08R651eL7uQjIkWk4oNIrDduDE6SyC7kVMujspqwj7cDTGjEP+cNtUCH6uVaR4VbFbMVrByP/5cLZhCxj1e1WgAzkytyT12CNuL2l/Pq4fNdh78De3S1s4hmY1WguxV/rolm0MpnqvnDWma0EVvLnxgpuImcsh2woLlPyZ9y9cqq21oSDIXrKla8iaaAg7ELNQ3+joDiOWaC6kRfCngcp8Hi692kp0ZtxpG0X6aX6OukzVRh+fvdWumwZVA18Cf+usOWFipi4bxzD+UYpjmtuSAhusSIhjdfu9QPF6BIpz2VER/lShEsJnEKtqkAKCopKLOz807/oB26awcdKwEYNKOyNg+isqzfiSbzaMXPWqQZcJkIo1czdCCqxIGuX8mkEvLsOUn491btMqajZsh6cHLtKMrWt4G44fFvCSj4gAh4FpROF1vcll2Y2UHkd8p9uHdv63484kfVcEPnC39k3y7cOQUaI0o0nEniZbNkYdPL1IPELv8qfXbzDlpgN0y+86Xfsz9p1QiitbrlKCYzGofohbfaAlkeebkjEUtwQlBwSoJ4EldzLABUho8iKJHNhglldqgzDwpn/p4g/QSYpWIjk4n4SD9H2aCek6YUhK9nIPZY3/juCAfpNs6OTzJRROBYqtrCr/P1/89eviy8+IPhjQ4hMv5+7HTcLdDXW3T0W2CVniYbjolazvW/RiiuVagKkGkTLzGFmX9J+derzYdPxeYSRpv8R+0MwZHOyQ4hI0gXuIfbl8Wg/EQBKwfttzPdeIQ8BZEFI3XigPTqctln5yvFxfwgG6Z2TfjHa3D1oaLOveSTXhgzeqPupdHFsd04OzEYyBZnyHMvCyFyDOytrWqJfK67kLfxoZOGRmbQZalRdscPzHM/qFdqOVObrKQrJ2ioIn39B8H+WwC2z2LJeryOrnPD/Xo0c7484hMnrhjSb0LSaML MIijifbY p5v4Dkzek8CHCUrbduKq2YwBnnnjIacDgjj6rCNbOwdZcJjgeeFvUNp/aLQ== 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(-)