From: Christoph Hellwig Subject: [RFC] remove pointless mount check Date: Mon, 13 May 2002 13:20:42 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20020513132042.A4949@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org Return-path: To: viro@math.psu.edu Content-Disposition: inline List-Id: linux-fsdevel.vger.kernel.org I have no idea why but during 2.4 someone put a stupid check in the mount code to check whether device and mount point are the same and refuse to overmount if true. There is no valid reason to keep this, especially as it breaks usefull setups (all user-writeable filesystems mounted -o noexec, overmount of /tmp in private namespace for Debian postinst scripts) Al, is it okay to send the patch to Linux & Marcelo? --- linux/fs/namespace.c~ Sun May 12 14:48:46 2002 +++ linux/fs/namespace.c Mon May 13 15:15:19 2002 @@ -631,11 +631,6 @@ if (!check_mnt(nd->mnt)) goto unlock; - /* Refuse the same filesystem on the same mount point */ - err = -EBUSY; - if (nd->mnt->mnt_sb == mnt->mnt_sb && nd->mnt->mnt_root == nd->dentry) - goto unlock; - mnt->mnt_flags = mnt_flags; err = graft_tree(mnt, nd); unlock: