From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: Move across mount,sb Date: Thu, 15 Mar 2007 01:46:55 +0000 Message-ID: <20070315014655.GO4095@ftp.linux.org.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: Jan Engelhardt Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:45626 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751049AbXCOBq4 (ORCPT ); Wed, 14 Mar 2007 21:46:56 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Mar 15, 2007 at 02:20:25AM +0100, Jan Engelhardt wrote: > Why is EXDEV returned when _vfs mountpoints_ are crossed? Should not it > be more like the following? > > error = -EXDEV; > if (oldnd.mnt->mnt_sb != newnd.mnt->mnt_sb) > goto exit2; > No. This is absolutely deliberate - mountpoint creates a boundary and such boundaries are very useful for restricting modifications of filesystem. IOW, it's not a bug and it applies to other operations as well (link(), for example).