Skip to content

Commit bc75a6e

Browse files
Ding Xiangtytso
Ding Xiang
authored andcommitted
ext4: make variable "count" signed
Since dx_make_map() may return -EFSCORRUPTED now, so change "count" to be a signed integer so we can correctly check for an error code returned by dx_make_map(). Fixes: 46c116b ("ext4: verify dir block before splitting it") Cc: stable@kernel.org Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20220530100047.537598-1-dingxiang@cmss.chinamobile.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent cf4ff93 commit bc75a6e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/ext4/namei.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1929,7 +1929,8 @@ static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir,
19291929
struct dx_hash_info *hinfo)
19301930
{
19311931
unsigned blocksize = dir->i_sb->s_blocksize;
1932-
unsigned count, continued;
1932+
unsigned continued;
1933+
int count;
19331934
struct buffer_head *bh2;
19341935
ext4_lblk_t newblock;
19351936
u32 hash2;

0 commit comments

Comments
 (0)