Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932695AbVKBJMj (ORCPT ); Wed, 2 Nov 2005 04:12:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932693AbVKBJMi (ORCPT ); Wed, 2 Nov 2005 04:12:38 -0500 Received: from [218.25.172.144] ([218.25.172.144]:22286 "HELO mail.fc-cn.com") by vger.kernel.org with SMTP id S932691AbVKBJMg (ORCPT ); Wed, 2 Nov 2005 04:12:36 -0500 Date: Wed, 2 Nov 2005 17:12:31 +0800 From: Coywolf Qi Hunt To: Hareesh Nagarajan Cc: Linux Kernel Development , akpm@osdl.org Subject: Re: [PATCH] register_filesystem() must return -EEXIST if the filesystem with the same name is already registered Message-ID: <20051102091231.GA12948@localhost.localdomain> References: <43687BE4.3000708@gmail.com> <20051102090656.GA12912@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051102090656.GA12912@localhost.localdomain> User-Agent: Mutt/1.5.11 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1416 Lines: 41 On Wed, Nov 02, 2005 at 05:06:56PM +0800, Coywolf Qi Hunt wrote: > On Wed, Nov 02, 2005 at 02:42:12AM -0600, Hareesh Nagarajan wrote: > > If we have a look at the register_filesystem() function defined in > > fs/filesystems.c, we see that if a filesystem with a same name has > > already been registered then the find_filesystem() function will return > > NON-NULL otherwise it will return NULL. > > > > Hence, register_filesystem() should return EEXIST instead of EBUSY. > > Returning EBUSY is misleading (unless of course I'm missing something > > obvious) to the caller of register_filesystem(). > > This `slot' is buy, so EBUSY makes sense. Filesytem is not file, hence s/buy/busy/ > EEXIST doesn't apply IMHO. > > Coywolf > > > > > Thanks, > > > > Hareesh Nagarajan > > > > > --- linux-2.6.13.4/fs/filesystems.c 2005-10-10 13:54:29.000000000 -0500 > > +++ linux-2.6.13.4-edit/fs/filesystems.c 2005-11-02 02:33:30.685600000 -0600 > > @@ -76,7 +76,7 @@ > > write_lock(&file_systems_lock); > > p = find_filesystem(fs->name); > > if (*p) > > - res = -EBUSY; > > + res = -EEXIST; > > else > > *p = fs; > > write_unlock(&file_systems_lock); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/