Browse Source

befs: iget_locked() doesn't return an ERR_PTR

Also fix befs_iget return value if iget_locked fails.

Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Rakesh Pandit 11 years ago
parent
commit
ac34a1b35e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      fs/befs/linuxvfs.c

+ 2 - 2
fs/befs/linuxvfs.c

@@ -324,8 +324,8 @@ static struct inode *befs_iget(struct super_block *sb, unsigned long ino)
 	befs_debug(sb, "---> befs_read_inode() " "inode = %lu", ino);
 
 	inode = iget_locked(sb, ino);
-	if (IS_ERR(inode))
-		return inode;
+	if (!inode)
+		return ERR_PTR(-ENOMEM);
 	if (!(inode->i_state & I_NEW))
 		return inode;