]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ext4: don't open-code ERR_CAST
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 10 Oct 2018 20:41:40 +0000 (16:41 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 10 Oct 2018 20:41:40 +0000 (16:41 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ext4/ialloc.c
fs/ext4/namei.c

index 2addcb8730e19afedcabac390e775124e6a66559..014f6a698cb712a25929f135238cb88614360d31 100644 (file)
@@ -1216,7 +1216,7 @@ struct inode *ext4_orphan_get(struct super_block *sb, unsigned long ino)
        bit = (ino - 1) % EXT4_INODES_PER_GROUP(sb);
        bitmap_bh = ext4_read_inode_bitmap(sb, block_group);
        if (IS_ERR(bitmap_bh))
-               return (struct inode *) bitmap_bh;
+               return ERR_CAST(bitmap_bh);
 
        /* Having the inode bit set should be a 100% indicator that this
         * is a valid orphan (no e2fsck run on fs).  Orphans also include
index 116ff68c5bd4337b7cb751330d091fcab24eecba..c31717e343d08fd29ffca9b0d72ae41a24782967 100644 (file)
@@ -1556,7 +1556,7 @@ static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, unsi
 
        bh = ext4_find_entry(dir, &dentry->d_name, &de, NULL);
        if (IS_ERR(bh))
-               return (struct dentry *) bh;
+               return ERR_CAST(bh);
        inode = NULL;
        if (bh) {
                __u32 ino = le32_to_cpu(de->inode);
@@ -1600,7 +1600,7 @@ struct dentry *ext4_get_parent(struct dentry *child)
 
        bh = ext4_find_entry(d_inode(child), &dotdot, &de, NULL);
        if (IS_ERR(bh))
-               return (struct dentry *) bh;
+               return ERR_CAST(bh);
        if (!bh)
                return ERR_PTR(-ENOENT);
        ino = le32_to_cpu(de->inode);