forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
e6ff9a9fa4
commit
ac34a1b35e
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user