Skip to content

Commit

Permalink
fs/ntfs3: Update inode->i_size after success write into compressed file
Browse files Browse the repository at this point in the history
[ Upstream commit d689684 ]

Reported-by: Giovanni Santini <giovannisantini93@yahoo.it>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
aalexandrovich authored and gregkh committed Mar 1, 2024
1 parent 8c77398 commit ded8bf5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/ntfs3/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,8 @@ static ssize_t ntfs_compress_write(struct kiocb *iocb, struct iov_iter *from)
iocb->ki_pos += written;
if (iocb->ki_pos > ni->i_valid)
ni->i_valid = iocb->ki_pos;
if (iocb->ki_pos > i_size)
i_size_write(inode, iocb->ki_pos);

return written;
}
Expand Down

0 comments on commit ded8bf5

Please sign in to comment.