Re: [PATCH 1/2] ntfs: keep the file size on a failed initialized-size extension
From: Namjae Jeon
Date: Thu Oct 29 2026 - 04:54:05 EST
On Wed, Oct 28, 2026 at 5:07 PM Hongling Zeng <zenghongling@xxxxxxxxxx> wrote:
>
> ntfs_extend_initialized_size() only extends the initialized size and
> never changes the data size, but on a failure it calls
> truncate_setsize() with the old initialized size, which shrinks the
> VFS size down to it and drops the page cache beyond that point.
>
> None of the callers rolls the shrunk size back. A buffered write
> into a hole has nothing to roll back - the data size never changed -
> so the file keeps the shrunk size even though the data size on disk
> is intact. The mmap and named stream callers return without any
> rollback either.
>
> The sizes did not change, so nothing needs the shrink. Remove it.
>
> Fixes: af0db57d4293 ("ntfs: update inode operations")
> Signed-off-by: Hongling Zeng <zenghongling@xxxxxxxxxx>
Applied it to #ntfs-next.
Thanks!