git: cdb337b0970f - main - vfs: fix copy-pasto in previous

From: Mateusz Guzik <mjg_at_FreeBSD.org>
Date: Fri, 20 May 2022 20:58:56 UTC
The branch main has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=cdb337b0970f9becdc1a4f026b73d93e50ff9e8b

commit cdb337b0970f9becdc1a4f026b73d93e50ff9e8b
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2022-05-20 20:58:11 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2022-05-20 20:58:11 +0000

    vfs: fix copy-pasto in previous
    
    Reported by:    dchagin
---
 sys/kern/vfs_syscalls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 600299fbe6eb..b27c18dd1d96 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -3492,7 +3492,7 @@ retry:
 	if (error != 0)
 		goto out;
 
-	error = vn_truncate_locked(vp, 0, false, td->td_ucred);
+	error = vn_truncate_locked(vp, length, false, td->td_ucred);
 out:
 	VOP_UNLOCK(vp);
 	vn_finished_write(mp);