public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: fdmanana@kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/3] btrfs: pass true to btrfs_delalloc_release_space() at btrfs_page_mkwrite()
Date: Wed, 14 May 2025 20:10:32 +0930	[thread overview]
Message-ID: <f2ddaf26-5b88-4f80-afdd-590fa5305c55@suse.com> (raw)
In-Reply-To: <b0fb503be36f4f51025b901b0c808412949b0a94.1747217722.git.fdmanana@suse.com>



在 2025/5/14 19:59, fdmanana@kernel.org 写道:
> From: Filipe Manana <fdmanana@suse.com>
> 
> In the last call to btrfs_delalloc_release_space() where the value of the
> variable 'ret' is never zero, we pass the expression 'ret != 0' as the
> value for the argument 'qgroup_free', which always evaluates to true.
> Make this less confusing and more clear by explicitly passing true
> instead.
> 
> Signed-off-by: Filipe Manana <fdmanana@suse.com>

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu

> ---
>   fs/btrfs/file.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
> index 32aad1b02b01..a2b1fc536fdd 100644
> --- a/fs/btrfs/file.c
> +++ b/fs/btrfs/file.c
> @@ -1971,7 +1971,7 @@ static vm_fault_t btrfs_page_mkwrite(struct vm_fault *vmf)
>   out:
>   	btrfs_delalloc_release_extents(BTRFS_I(inode), fsize);
>   	btrfs_delalloc_release_space(BTRFS_I(inode), data_reserved, page_start,
> -				     reserved_space, (ret != 0));
> +				     reserved_space, true);
>   out_noreserve:
>   	sb_end_pagefault(inode->i_sb);
>   	extent_changeset_free(data_reserved);


  reply	other threads:[~2025-05-14 10:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-14 10:29 [PATCH 0/3] btrfs: fix a bug and cleanups in btrfs_page_mkwrite() fdmanana
2025-05-14 10:29 ` [PATCH 1/3] btrfs: fix wrong start offset for delalloc space release during mmap write fdmanana
2025-05-14 10:38   ` Qu Wenruo
2025-05-14 10:41     ` Filipe Manana
2025-05-14 10:29 ` [PATCH 2/3] btrfs: pass true to btrfs_delalloc_release_space() at btrfs_page_mkwrite() fdmanana
2025-05-14 10:40   ` Qu Wenruo [this message]
2025-05-14 10:29 ` [PATCH 3/3] btrfs: simplify early error checking in btrfs_page_mkwrite() fdmanana
2025-05-14 10:50   ` Qu Wenruo
2025-05-14 10:57     ` Filipe Manana
2025-05-14 11:35       ` Filipe Manana
2025-05-14 11:38 ` [PATCH v2 0/5] btrfs: fix a bug and cleanups " fdmanana
2025-05-14 11:38   ` [PATCH v2 1/5] btrfs: fix wrong start offset for delalloc space release during mmap write fdmanana
2025-05-14 11:38   ` [PATCH v2 2/5] btrfs: pass true to btrfs_delalloc_release_space() at btrfs_page_mkwrite() fdmanana
2025-05-14 11:38   ` [PATCH v2 3/5] btrfs: simplify early error checking in btrfs_page_mkwrite() fdmanana
2025-05-14 21:01     ` Qu Wenruo
2025-05-14 11:38   ` [PATCH v2 4/5] btrfs: don't return VM_FAULT_SIGBUS on failure to set delalloc for mmap write fdmanana
2025-05-14 21:01     ` Qu Wenruo
2025-05-14 11:38   ` [PATCH v2 5/5] btrfs: use a single variable to track return value at btrfs_page_mkwrite() fdmanana
2025-05-14 21:02     ` Qu Wenruo
2025-05-15 13:19   ` [PATCH v2 0/5] btrfs: fix a bug and cleanups in btrfs_page_mkwrite() 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=f2ddaf26-5b88-4f80-afdd-590fa5305c55@suse.com \
    --to=wqu@suse.com \
    --cc=fdmanana@kernel.org \
    --cc=linux-btrfs@vger.kernel.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