Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2926546rwd; Fri, 16 Jun 2023 09:54:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4u0KXM3xwuuF7xuF0FzHIy/yT+QMAhQ2t7WNOy65Ksi+HVKB4IXbF29tUDoA/iQB+hjUNy X-Received: by 2002:a17:902:e803:b0:1b0:6544:1d4 with SMTP id u3-20020a170902e80300b001b0654401d4mr2736614plg.27.1686934472334; Fri, 16 Jun 2023 09:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686934472; cv=none; d=google.com; s=arc-20160816; b=GXMIMH1s+YbFYwXEL+vcvcux0NmBGuTYdy4gkMrLPpTyxeHY1ZvCcW9KbtHAhfvBY4 JlbCs1LOQp38+FwXdnp3fa80GmgoFXdr2tcRQoKrR5dZPo3c72cx/OH2743V+CY9QzZA V4lVbkSI5eiT0a21rkersDXmj8BgQ1OaQsY9kTW8y59GcEUkl/Wy7GY6+dMDE718ETyp tjw/OjW3bB3L6iWUaJo+KnqlW/VDfPv6udoA1rLPu+JydxyEGStaoidH/XlEPgEcLPVn d2FOIY33rWBZUenqGMy87OewwLw9vagC2gmasMNzmmeJ1WeQYm0SkSHX4OMtO/INWMH0 X8BQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=A9m6aB+fcbsckYfiFj7Gk3OhfCgUWPFcgLjEz+0Z9gM=; b=Ly0+59H8XbYTa4cXLTZSEEXg6iSiGIygK9aaaTd4QEaP5XE390pohmk4MG3bfV9PY9 zJ/GEnn9ZydimfxSOz3bAX4WDTd6ZpyME0Livx2z9X49GFqcrI7wTea9qwAt+clNAUX8 vQ0GdZhgEOFelLbiVbsFyVebzDhLTKr8vcIgRGJ3Yyyrucy25SlLBeGQeqCJ2RQ/oNJu mQCvWNRJ6T4RCKgtFOYXQbepOnbOwb8Qp7QGUidP0EW131EyftlImn3MWS241eW+YdfK UXuY+YSpY6DiVh05a5ugd+xVEwfMim9nN8cwNnaQ5z4LHYQhubM2mUSGXmb6j0XB6lUm +ROA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=s012W4SE; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c10-20020a170902d48a00b001b042e93c11si1017670plg.262.2023.06.16.09.54.17; Fri, 16 Jun 2023 09:54:32 -0700 (PDT) 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=@suse.cz header.s=susede2_rsa header.b=s012W4SE; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345658AbjFPQwM (ORCPT + 99 others); Fri, 16 Jun 2023 12:52:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345737AbjFPQvS (ORCPT ); Fri, 16 Jun 2023 12:51:18 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 716993AAA for ; Fri, 16 Jun 2023 09:51:11 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 224F11F8CC; Fri, 16 Jun 2023 16:51:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1686934270; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A9m6aB+fcbsckYfiFj7Gk3OhfCgUWPFcgLjEz+0Z9gM=; b=s012W4SElYS7YvQFkeIXQYgdz97M1d7vBdFW+4fKqrXTL01IG+aa9VZLSN1nYG8/jjUqiT GXboUesEVeXZz/6bSPArDWDpFdVmnF/GGkEhDhV5Il0EA74xHRBOD1ZzsOnKz5TUrxjcpz BlmYpM9zZEkXJWo4EXvN5qB/H+8HyZA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1686934270; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A9m6aB+fcbsckYfiFj7Gk3OhfCgUWPFcgLjEz+0Z9gM=; b=Iys+vyedrSFCTIMNiuJ7+OecbuAIaitvw1Sws2xOB+xiAwvaxXkOPktKHrb0r+arEBjE6y kJihfAZzY493KWAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 141D01391E; Fri, 16 Jun 2023 16:51:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id iZLnBP6SjGQqIwAAMHmgww (envelope-from ); Fri, 16 Jun 2023 16:51:10 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 76F6AA075F; Fri, 16 Jun 2023 18:51:09 +0200 (CEST) From: Jan Kara To: Ted Tso Cc: , Jan Kara Subject: [PATCH 02/11] ext4: Use sb_rdonly() helper for checking read-only flag Date: Fri, 16 Jun 2023 18:50:48 +0200 Message-Id: <20230616165109.21695-2-jack@suse.cz> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230616164553.1090-1-jack@suse.cz> References: <20230616164553.1090-1-jack@suse.cz> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1105; i=jack@suse.cz; h=from:subject; bh=ZsVILZbGIyRADFfbE7iVvyYurOfDqarYnbLEd07/hRw=; b=owEBbQGS/pANAwAIAZydqgc/ZEDZAcsmYgBkjJLoLR3AqKzvzY6MegP1eJGa+mLAJrgNm587/ZE7 A3YpKrmJATMEAAEIAB0WIQSrWdEr1p4yirVVKBycnaoHP2RA2QUCZIyS6AAKCRCcnaoHP2RA2d+eB/ 96dpy8sAB85l/K6hG0fKdkOuL68rvc8oSW6zatw9qnEHxI9NZA+MLASwEzqLeD4VzYEU6cTeMcK+qw DcinivBzrLxFpvKV/Dx87F8nnWKmEldkVGjcC6wpfdTvBtviVWnCY7NRHrL9ZMNONUH0ieh6Pw9sxE 9BQ0vGgRSKW8F58pKU+VAgl2Cf1vjE/TJvLFpqwj760ZBs7dhVuz/RT/dXuZEQp3ZOnDKvbVbNUL3z 74O1Rdo+wLa/cEHzwRlJNTIxmDd590v/glpO6XPrc33soX6QDXAdG3fjDT8Rdv/FFimjAdqK119hoL sqj+GPSHvRWjpQoS0EEmSolsHcvmjW X-Developer-Key: i=jack@suse.cz; a=openpgp; fpr=93C6099A142276A28BBE35D815BC833443038D8C Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 sb_rdonly() helper instead of directly checking sb->s_flags. Signed-off-by: Jan Kara --- fs/ext4/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index f24a7919a328..8c843ceb3cbb 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -6047,7 +6047,7 @@ static void ext4_update_super(struct super_block *sb) * the clock is set in the future, and this will cause e2fsck * to complain and force a full file system check. */ - if (!(sb->s_flags & SB_RDONLY)) + if (!sb_rdonly(sb)) ext4_update_tstamp(es, s_wtime); es->s_kbytes_written = cpu_to_le64(sbi->s_kbytes_written + @@ -6638,7 +6638,7 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb) * If there was a failing r/w to ro transition, we may need to * re-enable quota */ - if ((sb->s_flags & SB_RDONLY) && !(old_sb_flags & SB_RDONLY) && + if (sb_rdonly(sb) && !(old_sb_flags & SB_RDONLY) && sb_any_quota_suspended(sb)) dquot_resume(sb, -1); sb->s_flags = old_sb_flags; -- 2.35.3