Received: by 10.192.165.156 with SMTP id m28csp721242imm; Thu, 19 Apr 2018 06:32:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+1wXK7hkD3XbJz9IrVajExPEsmVXb7gO/jvXNW4m9JqaLiZ4cFRNBWNTrOoL+ZOLBgV5nv X-Received: by 10.99.103.131 with SMTP id b125mr5078629pgc.177.1524144766321; Thu, 19 Apr 2018 06:32:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524144766; cv=none; d=google.com; s=arc-20160816; b=xR+dxYOIHBu/jLNnTcc0mz2baoYSdsvwLZ6in0QsiIz1Q7JznbYmkzEFStMlYp7XVt ki2b4q75LYeKZqw4JLcplR9qmBl/9m2WyIsz64kg76J/jAJM7Gr0Z4hZb8iRwwF92feT reqG/jtli0g6rvDYmnuM3trCRrLXX0iDdaSJKOVMFB1KxQFkfcWXy3HbJy1g4w5iiOWM uhoi1d5MAyaDlr0O+BARoU6m4XZm3Gl5Tf6mZvzNYJ9qCtGGJJMS7v8+hGQ/NDy1mWLU MCwiPloyO0N/TafmYlDNUuZlgfgTkk+j++mduGNZnV7eIJihLRSi2yzoXw7JCxGdS8qX e/7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:organization:arc-authentication-results; bh=imz7gB7TpGYTHlCU+Zpgv17pT9GUx8n9U43+12e4qnI=; b=U9rVyTCwuwUS99fLf6e9M8xTZm3YCKltFJsQmpmfkJRjfNzdfMXIrJZAT5KJPyBDaI oy7LU8nRcn4GIhnUpo/CNd7E3RI32OZjC+0fgVIqcWgPmsFTthtM68sYatVYYwB9P609 Si8u1Xx9usMoW54wJiKD97CTixaROHgXA2GjRCVr58E3GUIeHjRZend/RgBhOEgJF13s tkO/0WJ7JRiMRoPLJ72SxhwJhGKVVi9WMVxSJccUSnWB8nz4DBkuLmxkRUN0hM+NXGrY NGpgzkxNbmGqr6T8Z5ohcsR5daDGwqkBafjA9x5DNQrZhcczWai3U9GcH2gkQChy+rc/ o4Sg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s189si1001455pgc.571.2018.04.19.06.32.32; Thu, 19 Apr 2018 06:32:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752380AbeDSNbP (ORCPT + 99 others); Thu, 19 Apr 2018 09:31:15 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:42664 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751903AbeDSNbL (ORCPT ); Thu, 19 Apr 2018 09:31:11 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 226C542636E8; Thu, 19 Apr 2018 13:31:11 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-121-60.rdu2.redhat.com [10.10.121.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4405C1C723; Thu, 19 Apr 2018 13:31:10 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 01/24] vfs: Undo an overly zealous MS_RDONLY -> SB_RDONLY conversion [ver #7] From: David Howells To: viro@zeniv.linux.org.uk Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, dhowells@redhat.com, linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-afs@lists.infradead.org Date: Thu, 19 Apr 2018 14:31:08 +0100 Message-ID: <152414466871.23902.14667248706795552315.stgit@warthog.procyon.org.uk> In-Reply-To: <152414466005.23902.12967974041384198114.stgit@warthog.procyon.org.uk> References: <152414466005.23902.12967974041384198114.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 19 Apr 2018 13:31:11 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 19 Apr 2018 13:31:11 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dhowells@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In do_mount() when the MS_* flags are being converted to MNT_* flags, MS_RDONLY got accidentally convered to SB_RDONLY. Undo this change. Fixes: e462ec50cb5f ("VFS: Differentiate mount flags (MS_*) from internal superblock flags") Signed-off-by: David Howells --- fs/namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/namespace.c b/fs/namespace.c index e398f32d7541..6f720ebca133 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -2814,7 +2814,7 @@ long do_mount(const char *dev_name, const char __user *dir_name, mnt_flags |= MNT_NODIRATIME; if (flags & MS_STRICTATIME) mnt_flags &= ~(MNT_RELATIME | MNT_NOATIME); - if (flags & SB_RDONLY) + if (flags & MS_RDONLY) mnt_flags |= MNT_READONLY; /* The default atime for remount is preservation */