public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Filipe Manana <fdmanana@kernel.org>
To: Alexey Velichayshiy <a.velichayshiy@ispras.ru>
Cc: Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>,
	 Filipe Manana <fdmanana@suse.com>,
	linux-btrfs@vger.kernel.org,  linux-kernel@vger.kernel.org,
	linux-project@linuxtesting.org
Subject: Re: [PATCH] btrfs: Remove redundant nowait check in lock_extent_direct
Date: Mon, 23 Feb 2026 12:55:27 +0000	[thread overview]
Message-ID: <CAL3q7H4LhJ3zTZUwvmuFTY8DqBqPHfTO1CRtFiwJDAUMpaYT_w@mail.gmail.com> (raw)
In-Reply-To: <20260222124758.953175-1-a.velichayshiy@ispras.ru>

On Sun, Feb 22, 2026 at 12:48 PM Alexey Velichayshiy
<a.velichayshiy@ispras.ru> wrote:
>
> The nowait flag is always false in this context, making the conditional
> check unnecessary. Simplify the code by directly assigning -ENOTBLK.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Alexey Velichayshiy <a.velichayshiy@ispras.ru>

Reviewed-by: Filipe Manana <fdmanana@suse.com>

Pushed into the for-next branch [1] with minor changes to the subject
(uncapitalize first word and add () to function name).

[1] https://github.com/btrfs/linux/commits/for-next/

> ---
>  fs/btrfs/direct-io.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/direct-io.c b/fs/btrfs/direct-io.c
> index 07e19e88ba4b..72a229c44833 100644
> --- a/fs/btrfs/direct-io.c
> +++ b/fs/btrfs/direct-io.c
> @@ -107,7 +107,7 @@ static int lock_extent_direct(struct inode *inode, u64 lockstart, u64 lockend,
>                             test_bit(BTRFS_ORDERED_DIRECT, &ordered->flags))
>                                 btrfs_start_ordered_extent(ordered);
>                         else
> -                               ret = nowait ? -EAGAIN : -ENOTBLK;
> +                               ret = -ENOTBLK;
>                         btrfs_put_ordered_extent(ordered);
>                 } else {
>                         /*
> --
> 2.43.0
>
>

      reply	other threads:[~2026-02-23 12:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-22 12:47 [PATCH] btrfs: Remove redundant nowait check in lock_extent_direct Alexey Velichayshiy
2026-02-23 12:55 ` Filipe Manana [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=CAL3q7H4LhJ3zTZUwvmuFTY8DqBqPHfTO1CRtFiwJDAUMpaYT_w@mail.gmail.com \
    --to=fdmanana@kernel.org \
    --cc=a.velichayshiy@ispras.ru \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=fdmanana@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-project@linuxtesting.org \
    /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