linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Lu Fengqi <lufq.fnst@cn.fujitsu.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 3/3] btrfs: remove redundant nowait check for buffered_write
Date: Wed, 28 Nov 2018 09:04:31 +0200	[thread overview]
Message-ID: <2aa63759-0c0a-a8f8-c02e-e215e1be6c73@suse.com> (raw)
In-Reply-To: <20181128032330.11753-1-lufq.fnst@cn.fujitsu.com>



On 28.11.18 г. 5:23 ч., Lu Fengqi wrote:
> The generic_write_checks will check the combination of IOCB_NOWAIT and
> !IOCB_DIRECT.

True, however btrfs will return ENOSUPP whereas the generic code returns
EINVAL. I guess this is not a big deal and it's likely generic code is
correct, so:

Reviewed-by: Nikolay Borisov <nborisov@suse.com>

> 
> Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
> ---
>  fs/btrfs/file.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
> index 3835bb8c146d..190db9a685a2 100644
> --- a/fs/btrfs/file.c
> +++ b/fs/btrfs/file.c
> @@ -1889,10 +1889,6 @@ static ssize_t btrfs_file_write_iter(struct kiocb *iocb,
>  	loff_t oldsize;
>  	int clean_page = 0;
>  
> -	if (!(iocb->ki_flags & IOCB_DIRECT) &&
> -	    (iocb->ki_flags & IOCB_NOWAIT))
> -		return -EOPNOTSUPP;
> -
>  	if (!inode_trylock(inode)) {
>  		if (iocb->ki_flags & IOCB_NOWAIT)
>  			return -EAGAIN;
> 

  reply	other threads:[~2018-11-28  7:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-28  3:21 [PATCH 1/3] btrfs: remove always true if branch in find_delalloc_range Lu Fengqi
2018-11-28  3:22 ` [PATCH 2/3] btrfs: cleanup the useless DEFINE_WAIT in cleanup_transaction Lu Fengqi
2018-11-28  7:02   ` Nikolay Borisov
2018-11-28 13:34   ` Johannes Thumshirn
2018-11-28 16:24   ` David Sterba
2018-11-28  3:23 ` [PATCH 3/3] btrfs: remove redundant nowait check for buffered_write Lu Fengqi
2018-11-28  7:04   ` Nikolay Borisov [this message]
2018-11-28 16:20     ` David Sterba
2018-11-28 13:36   ` Johannes Thumshirn
2018-11-28  7:01 ` [PATCH 1/3] btrfs: remove always true if branch in find_delalloc_range Nikolay Borisov
2018-11-28  9:33   ` Lu Fengqi
2018-11-29  3:33 ` [PATCH v2 " Lu Fengqi
2018-11-29  7:05   ` Nikolay Borisov
2018-12-04 14:35   ` David Sterba

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=2aa63759-0c0a-a8f8-c02e-e215e1be6c73@suse.com \
    --to=nborisov@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lufq.fnst@cn.fujitsu.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;
as well as URLs for NNTP newsgroup(s).