From: viro@parcelfarce.linux.theplanet.co.uk Subject: Re: pivotroot does not work with initramfs Date: Sat, 22 Nov 2003 21:50:55 +0000 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20031122215054.GH24159@parcelfarce.linux.theplanet.co.uk> References: <20031116170438.GA4466@suse.de> <20031122164608.GA8009@suse.de> <20031122204854.GA9512@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, Linus Torvalds Return-path: Received: from parcelfarce.linux.theplanet.co.uk ([195.92.249.252]:2775 "EHLO www.linux.org.uk") by vger.kernel.org with ESMTP id S262774AbTKVVu4 (ORCPT ); Sat, 22 Nov 2003 16:50:56 -0500 To: Olaf Hering Content-Disposition: inline In-Reply-To: <20031122204854.GA9512@suse.de> List-Id: linux-fsdevel.vger.kernel.org On Sat, Nov 22, 2003 at 09:48:54PM +0100, Olaf Hering wrote: > --- linuxppc-2.5_2.6.0-test9-bk.orig/fs/namespace.c 2003-10-08 03:52:02.000000000 +0200 > +++ linuxppc-2.5_2.6.0-test9-bk/fs/namespace.c 2003-11-22 21:46:27.000000000 +0100 > @@ -99,6 +99,7 @@ EXPORT_SYMBOL(lookup_mnt); > static int check_mnt(struct vfsmount *mnt) > { > spin_lock(&vfsmount_lock); > + if(mnt->mnt_parent->mnt_parent != mnt) > while (mnt->mnt_parent != mnt) > mnt = mnt->mnt_parent; > spin_unlock(&vfsmount_lock); That's just plain ugly. Could you explain what the hell are you trying to do? If it's an attempt to make pivot_root move rootfs somewhere else - the above is nowhere near enough. If it's something else, I wonder how the could that patch change anything. *NOTE*: attempting to move rootfs away from root of mount tree is unsupported and for a good reason - it complicates logics big way and doesn't buy you anything that couldn't be done without it.