summaryrefslogtreecommitdiffstats
path: root/fs/befs
diff options
context:
space:
mode:
authorRakesh Pandit <rakesh@tuxera.com>2014-01-15 19:58:28 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2014-01-25 03:14:38 -0500
commitac34a1b35eca5ef64cb499e25f776bf42a81a660 (patch)
tree867f339a9197c6718a69b6171a05f732b0f752b2 /fs/befs
parente6ff9a9fa4e05c1c03dec63cdc6a87d6dea02755 (diff)
downloadop-kernel-dev-ac34a1b35eca5ef64cb499e25f776bf42a81a660.zip
op-kernel-dev-ac34a1b35eca5ef64cb499e25f776bf42a81a660.tar.gz
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>
Diffstat (limited to 'fs/befs')
-rw-r--r--fs/befs/linuxvfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index daa15d6..845d2d6 100644
--- a/fs/befs/linuxvfs.c
+++ b/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;
OpenPOWER on IntegriCloud