From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karel Zak Subject: Re: Remount root RO after the root dentry drops from the namespace Date: Wed, 18 Nov 2009 15:52:12 +0100 Message-ID: <20091118145212.GA24178@nb.net.home> References: <1258542722.2761.40.camel@localhost.localdomain> <1258547912.2761.46.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Daniel Drake , linux-fsdevel@vger.kernel.org To: Miklos Szeredi Return-path: Received: from mx1.redhat.com ([209.132.183.28]:3649 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754317AbZKROwX (ORCPT ); Wed, 18 Nov 2009 09:52:23 -0500 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Nov 18, 2009 at 01:58:31PM +0100, Miklos Szeredi wrote: > On Wed, 18 Nov 2009, Daniel Drake wrote: > > > > if (flags & MS_BIND) > > err = change_mount_flags(path->mnt, flags); > > else > > err = do_remount_sb(sb, flags, data, 0); > > > > Note: the "flags" tested here are supplied from the argument of > mount(2), and are not flags stored in the mount. And btw, MS_BIND is > not stored in the mount at all, there's absolutely no difference > between a mount created with "--bind" and one without. The "flags" argument of mount(2) always contains MS_BIND for bind mounts (if you use standard mount(8) command and /etc/mtab) for -o remount. Karel -- Karel Zak