Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 5f0d594c authored by Tony Solomonik's avatar Tony Solomonik Committed by Jens Axboe
Browse files

Add do_ftruncate that truncates a struct file


do_sys_ftruncate receives a file descriptor, fgets the struct file, and
finally actually truncates the file.

do_ftruncate allows for passing in a file directly, with the caller
already holding a reference to it.

Signed-off-by: default avatarTony Solomonik <tony.solomonik@gmail.com>
Reviewed-by: default avatarChristian Brauner <brauner@kernel.org>
Link: https://lore.kernel.org/r/20240202121724.17461-2-tony.solomonik@gmail.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent a6e959bd
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment