public inbox for [email protected]
 help / color / mirror / Atom feed
From: Matthew Wilcox <[email protected]>
To: Tony Solomonik <[email protected]>
Cc: [email protected], [email protected],
	[email protected], [email protected]
Subject: Re: [PATCH v5 1/2] Add ftruncate_file that truncates a struct file
Date: Thu, 25 Jan 2024 18:01:23 +0000	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On Wed, Jan 24, 2024 at 10:33:00AM +0200, Tony Solomonik wrote:
>  	/* explicitly opened as large or we are on 64-bit box */
> -	if (f.file->f_flags & O_LARGEFILE)
> +	if (file->f_flags & O_LARGEFILE)
>  		small = 0;
>  
[...]
>  	/* Cannot ftruncate over 2^31 bytes without large file support */
>  	if (small && length > MAX_NON_LFS)
> -		goto out_putf;
> +		return -EINVAL;

I'd leave this in do_sys_truncate().  No need for ioring to care about
this ancient problem.


  parent reply	other threads:[~2024-01-25 18:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24  8:32 [PATCH v5 0/2] io_uring: add support for ftruncate Tony Solomonik
2024-01-24  8:33 ` [PATCH v5 1/2] Add ftruncate_file that truncates a struct file Tony Solomonik
2024-01-25 17:56   ` Christian Brauner
2024-01-25 18:01   ` Matthew Wilcox [this message]
2024-01-24  8:33 ` [PATCH v5 2/2] io_uring: add support for ftruncate Tony Solomonik
2024-01-24  8:52 ` [PATCH v5 0/2] " Cedric Blancher
2024-01-24 12:52   ` Jens Axboe
2024-01-24 13:35     ` Cedric Blancher
2024-01-24 13:42       ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox