befs: iget_locked() doesn't return an ERR_PTR
authorRakesh Pandit <rakesh@tuxera.com>
Wed, 15 Jan 2014 17:58:28 +0000 (19:58 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 25 Jan 2014 08:14:38 +0000 (03:14 -0500)
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>
fs/befs/linuxvfs.c

index daa15d6ba45077755d2bc859cfffb44f6a82bfd0..845d2d690ce2dc2becddef70041a3e6b69440d62 100644 (file)
@@ -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;