lkml.org 
[lkml]   [2005]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] register_filesystem() must return -EEXIST if the filesystem with the same name is already registered
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().

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);
\
 
 \ /
  Last update: 2005-11-02 09:45    [W:0.119 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site