From: Hareesh Nagarajan <hnagar2@gmail.com>
To: Coywolf Qi Hunt <qiyong@fc-cn.com>
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>, akpm@osdl.org
Subject: Re: [PATCH] register_filesystem() must return -EEXIST if the filesystem with the same name is already registered
Date: Wed, 02 Nov 2005 11:37:42 -0600 [thread overview]
Message-ID: <4368F966.20901@gmail.com> (raw)
In-Reply-To: <20051102090656.GA12912@localhost.localdomain>
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
> EEXIST doesn't apply IMHO.
Earlier this week, my calls to register_filesystem(struct
file_system_type * fs) were failing returning an -EBUSY. Now I didn't
know if it was failing because of:
if (fs->next) return -EBUSY;
Or:
p = find_filesystem(fs->name);
if (*p) res = -EBUSY;
...
return res;
It is for this reason I thought it would make sense to differentiate
between the two points of failure.
Hareesh Nagarajan
prev parent reply other threads:[~2005-11-02 17:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-02 8:42 [PATCH] register_filesystem() must return -EEXIST if the filesystem with the same name is already registered Hareesh Nagarajan
2005-11-02 9:06 ` Coywolf Qi Hunt
2005-11-02 9:12 ` Coywolf Qi Hunt
2005-11-02 17:37 ` Hareesh Nagarajan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4368F966.20901@gmail.com \
--to=hnagar2@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=qiyong@fc-cn.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox