Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3371278rdb; Thu, 16 Nov 2023 07:53:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IHeBNpFDiGHNqk5Ow3zjdmGTxqvdfr/rb+M7CIDeYJng9/AVKruo/CVTmjAX/wYfLBgIfAT X-Received: by 2002:a17:902:ec8f:b0:1cc:e76e:79ab with SMTP id x15-20020a170902ec8f00b001cce76e79abmr8887225plg.31.1700150027618; Thu, 16 Nov 2023 07:53:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700150027; cv=none; d=google.com; s=arc-20160816; b=SNbDoDp1aygdUhtPJxZg+4S/K51reENc9O8kpYEcMkKL14BoKqcp7HucIuWf2GmBVs 3XPlRsVHb6Kj9MJH0peMVyxzOQmjgt4SYJTw10123NBmDCKENIfWwfDAFVlyKjkE5qWc 6FSE9oTAPIvESdXxueHpXCMnDpYjVK1kV/HiIzftgJ5VAqZamcDyLTh426UQ71hoM8Kc qTtAI9iwNsmmc/+nfyjpXg9pCzhkYWDKwFU81hwmKq1rNW6fNZJuAz/ThcFeGwLHPomV KNENLpZGUx9HEKbiFt5NMvc3lxoYKpwn57UApr4pd+fCVuYbZr9bH7V2hRQJmqEIDVes FMSw== 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; bh=QXSR/5dGYSLLIzkrUqlSUZEGpATfuh7Jb7sNeswoiGc=; fh=9hT4l0EMR1D2zdgUoRXiqFwsybSJyrmM/FC/blQlPsI=; b=JOvqPrJzvQeZdtk65laxhKKbaG7VLU2955UrsM+m/JpitgRvrl1Ij/ehK9rIxIwlf7 OgWJ6AFqvyGdcK3hO1b+xudD63bFycbZ5KXI37Dueldx0bREKRaVcD4RmwGjwPd2nrP+ Qk4+cbgDkvJG+iOOnCi3st0JwXU1GX6h9Or6Rwx1r2tpH0VrjhKOqqb8iMIQvb7TTUPJ ffYBd0Ls8lLays7dhzI+HUZyu/jyWlZty70pKEBgPig1i5zGj5EHcxnreE5gb6I8PfAo cZ1ZbYZ4WcFF3t7HpDDrycLjkbaeHpSWEk/YoNqb5YAKM2rHAHEOYjd9dx+TvrQCLOoB v/SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="QEYl1/fw"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id p12-20020a170902eacc00b001cc43368c9bsi12064706pld.630.2023.11.16.07.53.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 07:53:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="QEYl1/fw"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A9AB781D7A4D; Thu, 16 Nov 2023 07:53:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345443AbjKPPxi (ORCPT + 99 others); Thu, 16 Nov 2023 10:53:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345437AbjKPPxb (ORCPT ); Thu, 16 Nov 2023 10:53:31 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 769FCD59 for ; Thu, 16 Nov 2023 07:53:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700150007; h=from:from:reply-to:subject:subject: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=QXSR/5dGYSLLIzkrUqlSUZEGpATfuh7Jb7sNeswoiGc=; b=QEYl1/fwUTqW9eUdnPb38MKuyWkZ5wqyK65U9a6ERHOr6zyUIJsYFW6XIF8xdMGBUeW7OY nLd+AJx6ZnFPPh9eCvGrV9A9KRkJGyfsmfozau02ZnAzZG6BEfSrOlkiz7wtrBkj2L2z+l Pp45tHGsk9ZOC1WAcMAwmE7lxI7pni8= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-50-tVT4BDpqNDOIyaQdbQ-Cdg-1; Thu, 16 Nov 2023 10:53:24 -0500 X-MC-Unique: tVT4BDpqNDOIyaQdbQ-Cdg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 19A543C0F36D; Thu, 16 Nov 2023 15:53:24 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4D1A0492BFE; Thu, 16 Nov 2023 15:53:23 +0000 (UTC) From: David Howells To: Marc Dionne Cc: David Howells , linux-afs@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] afs: Mark a superblock for an R/O or Backup volume as SB_RDONLY Date: Thu, 16 Nov 2023 15:53:12 +0000 Message-ID: <20231116155312.156593-6-dhowells@redhat.com> In-Reply-To: <20231116155312.156593-1-dhowells@redhat.com> References: <20231116155312.156593-1-dhowells@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 16 Nov 2023 07:53:46 -0800 (PST) Mark a superblock that is for for an R/O or Backup volume as SB_RDONLY when mounting it. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org --- fs/afs/super.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/afs/super.c b/fs/afs/super.c index e95fb4cb4fcd..a01a0fb2cdbb 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c @@ -407,8 +407,10 @@ static int afs_validate_fc(struct fs_context *fc) return PTR_ERR(volume); ctx->volume = volume; - if (volume->type != AFSVL_RWVOL) + if (volume->type != AFSVL_RWVOL) { ctx->flock_mode = afs_flock_mode_local; + fc->sb_flags |= SB_RDONLY; + } } return 0;