Просмотр исходного кода

JFS: diAlloc() should return -EIO rather than EIO

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>
Li Zefan 17 лет назад
Родитель
Сommit
3c65e8743b
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      fs/jfs/jfs_imap.c

+ 1 - 1
fs/jfs/jfs_imap.c

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