]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ext4: fix wrong return value in ext4_read_inode_bitmap()
authorWang Shilong <wshilong@ddn.com>
Sat, 12 May 2018 15:35:01 +0000 (11:35 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 12 May 2018 15:35:01 +0000 (11:35 -0400)
The only reason that sb_getblk() could fail is out of memory,
ext4 codes have returned -ENOMME for all other places except this
one, let's fix it here too.

Signed-off-by: Wang Shilong <wshilong@ddn.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/ialloc.c

index df92e3ec9913d8ab19f9e763e9bfbcf88d824f27..33a2c98ce1ff502d300c9a1bfdeefbb396c4c99b 100644 (file)
@@ -143,7 +143,7 @@ ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group)
                ext4_error(sb, "Cannot read inode bitmap - "
                            "block_group = %u, inode_bitmap = %llu",
                            block_group, bitmap_blk);
-               return ERR_PTR(-EIO);
+               return ERR_PTR(-ENOMEM);
        }
        if (bitmap_uptodate(bh))
                goto verify;