Re: [PATCH v2 8/9] exfat: add iomap direct I/O support
From: Christoph Hellwig
Date: Tue May 12 2026 - 02:44:04 EST
> +static int exfat_truncate(struct inode *inode)
> {
> struct super_block *sb = inode->i_sb;
> struct exfat_sb_info *sbi = EXFAT_SB(sb);
> @@ -315,6 +315,8 @@ void exfat_truncate(struct inode *inode)
> inode->i_blocks = round_up(i_size_read(inode), sbi->cluster_size) >> 9;
> write_size:
> mutex_unlock(&sbi->s_lock);
> +
> + return err;
Allowing error returns here looks unrelated to iomap usage?
> + if (iov_iter_count(from)) {
> + loff_t offset, end;
> + ssize_t written;
> + int ret2;
.. splitting this whole code block into a helper would be nice.
And eventually it might be worth to lift it to iomap as we have
a few open coded versions of it.
> +out:
> + return ret;
> +}
Usuaully just directly returning instead of jumping to a label that
returns is easier to follow.
Otherwise this looks good:
Reviewed-by: Christoph Hellwig <hch@xxxxxx>