JFS: diAlloc() should return -EIO rather than EIO
authorLi Zefan <lizf@cn.fujitsu.com>
Wed, 28 May 2008 13:58:56 +0000 (08:58 -0500)
committerDave Kleikamp <shaggy@linux.vnet.ibm.com>
Wed, 28 May 2008 13:58:56 +0000 (08:58 -0500)
The comment above the function says one of its return value is -EIO,
and also the caller of diAlloc() checks for -EIO:

struct inode *ialloc(struct inode *parent, umode_t mode)
{
...
rc = diAlloc(parent, S_ISDIR(mode), inode);
if (rc) {
jfs_warn("ialloc: diAlloc returned %d!", rc);
if (rc == -EIO)
make_bad_inode(inode);
...

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
fs/jfs/jfs_imap.c

index 734ec91..d6363d8 100644 (file)
@@ -1520,7 +1520,7 @@ int diAlloc(struct inode *pip, bool dir, struct inode *ip)
                                        jfs_error(ip->i_sb,
                                                  "diAlloc: can't find free bit "
                                                  "in wmap");
-                                       return EIO;
+                                       return -EIO;
                                }
 
                                /* determine the inode number within the