Skip to contentSkip to conversation

efs: iget_locked() doesn't return an ERR_PTR()

PATCH In review Dan Carpenter 2 participants 2 messages Aug 14, 2013 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efs: iget_locked() doesn't return an ERR_PTR()

The iget_locked() function returns NULL on error and never an ERR_PTR.

fs/efs/inode.c +1 -1
index f3913eb..d15ccf2 100644
@@ -57,7 +57,7 @@ struct inode *efs_iget(struct super_block *super, unsigned long ino)
 	struct inode *inode;
 
 	inode = iget_locked(super, ino);
-	if (IS_ERR(inode))
+	if (!inode)
 		return ERR_PTR(-ENOMEM);
 	if (!(inode->i_state & I_NEW))
 		return inode;
Acked-by Serge Hallyn on v1 1/1
#1 lore raw
Quoted 3 lines · Dan Carpenter

The iget_locked() function returns NULL on error and never an ERR_PTR.

Quoted 18 lines
fs/efs/inode.c +1 -2
index f3913eb..d15ccf2 100644
@@ -57,7 +57,7 @@ struct inode *efs_iget(struct super_block *super, unsigned long ino)
 	struct inode *inode;
 
 	inode = iget_locked(super, ino);
-	if (IS_ERR(inode))
+	if (!inode)
 		return ERR_PTR(-ENOMEM);
 	if (!(inode->i_state & I_NEW))
 		return inode;
--

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/