[patch] fs/affs: affs_bread() doesn't return ERR_PTRs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We're checking IS_ERR() here, but we should be checking for NULL.

Fixes: e393e82a7d09 ("fs/affs: make export work with cold dcache")
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

diff --git a/fs/affs/namei.c b/fs/affs/namei.c
index a3df8a6..706dd06 100644
--- a/fs/affs/namei.c
+++ b/fs/affs/namei.c
@@ -453,8 +453,8 @@ static struct dentry *affs_get_parent(struct dentry *child)
 	struct buffer_head *bh;
 
 	bh = affs_bread(child->d_sb, d_inode(child)->i_ino);
-	if (IS_ERR(bh))
-		return ERR_CAST(bh);
+	if (bh)
+		return ERR_PTR(-EIO);
 
 	parent = affs_iget(child->d_sb,
 			   be32_to_cpu(AFFS_TAIL(child->d_sb, bh)->parent));
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux