minix: Correct errno in minix_new_inode

The cases (!j || j > sbi->s_ninodes) can never occur unless the
filesystem is broken, so this should not return ENOSPC, but
EFSCORRUPTED.

Signed-off-by: Jori Koolstra <jkoolstra@xs4all.nl>
Link: https://patch.msgid.link/20251201122338.90568-1-jkoolstra@xs4all.nl
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Jori Koolstra and committed by
Christian Brauner
ef0b6474 4a403d7a

+1 -1
+1 -1
fs/minix/bitmap.c
··· 247 247 j += i * bits_per_zone; 248 248 if (!j || j > sbi->s_ninodes) { 249 249 iput(inode); 250 - return ERR_PTR(-ENOSPC); 250 + return ERR_PTR(-EFSCORRUPTED); 251 251 } 252 252 inode_init_owner(&nop_mnt_idmap, inode, dir, mode); 253 253 inode->i_ino = j;