On Mon, Oct 06, 2014 at 05:09:03PM +0200, Jan Kara wrote: > > + if (ret_inode && !IS_ERR(ret_inode) && > > + ino < EXT4_FIRST_INO(sb) && ino != EXT4_ROOT_INO) > > + make_bad_inode(ret_inode); > > + return ret_inode; > Hum, why don't we just return an error (like EIO) when invalid inode > number is passed? Yeah, I guess we can do that. We need to support the make_bad_inode() for the sake of EXT4_IOC_SWAP_BOOT. But that code path doesn't need to use ext4_iget_normal(). So yeah, in the case of ext4_iget_normal(), we should be able to just return -EIO and let the userspace fail fast with the open(2) instead of later on with the read(2) or write(2) or truncate(2) call. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html