mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Lukáš Czerner" <lczerner@redhat.com>
To: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Namjae Jeon <namjae.jeon@samsung.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tmpfs: ZERO_RANGE and COLLAPSE_RANGE not currently supported
Date: Tue, 17 Jun 2014 09:58:35 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1406170956420.2148@localhost.localdomain> (raw)
In-Reply-To: <alpine.LSU.2.11.1406151816410.31998@eggly.anvils>

On Sun, 15 Jun 2014, Hugh Dickins wrote:

> Date: Sun, 15 Jun 2014 18:28:00 -0700 (PDT)
> From: Hugh Dickins <hughd@google.com>
> To: Andrew Morton <akpm@linux-foundation.org>
> Cc: Lukas Czerner <lczerner@redhat.com>,
>     Namjae Jeon <namjae.jeon@samsung.com>, linux-kernel@vger.kernel.org
> Subject: [PATCH] tmpfs: ZERO_RANGE and COLLAPSE_RANGE not currently supported
> 
> I was well aware of FALLOC_FL_ZERO_RANGE and FALLOC_FL_COLLAPSE_RANGE
> support being added to fallocate(); but didn't realize until now that
> I had been too stupid to future-proof shmem_fallocate() against new
> additions.  -EOPNOTSUPP instead of going on to ordinary fallocation.

Looks good.

Reviewed-by: Lukas Czerner <lczerner@redhat.com>

> 
> Signed-off-by: Hugh Dickins <hughd@google.com>
> Cc: stable@vger.kernel.org # v3.15
> ---
> 
>  mm/shmem.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> --- v3.15/mm/shmem.c	2014-06-08 11:19:54.000000000 -0700
> +++ linux/mm/shmem.c	2014-06-15 18:01:16.988996166 -0700
> @@ -1728,6 +1728,9 @@ static long shmem_fallocate(struct file
>  	pgoff_t start, index, end;
>  	int error;
>  
> +	if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE))
> +		return -EOPNOTSUPP;
> +
>  	mutex_lock(&inode->i_mutex);
>  
>  	if (mode & FALLOC_FL_PUNCH_HOLE) {
> 

      reply	other threads:[~2014-06-17  7:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-16  1:28 Hugh Dickins
2014-06-17  7:58 ` Lukáš Czerner [this message]

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 \
    --in-reply-to=alpine.LFD.2.00.1406170956420.2148@localhost.localdomain \
    --to=lczerner@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namjae.jeon@samsung.com \
    /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

all inboxes | Powered by JetHome®