From: Anand Jain <anand.jain@oracle.com>
To: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/4] btrfs: sink gfp_t parameter to btrfs_backref_iter_alloc
Date: Thu, 20 Oct 2022 13:56:13 +0800 [thread overview]
Message-ID: <5507e5e4-e1cf-78d7-d756-59fc8e258a57@oracle.com> (raw)
In-Reply-To: <c7040cb687cebc01e3155a330146fd55cc04f6f1.1666103172.git.dsterba@suse.com>
On 18/10/2022 22:27, David Sterba wrote:
> There's only one caller that passes GFP_NOFS, we can drop the parameter
> an use the flags directly.
>
Compile fails with this patch, needs to update the relocate.c as well.
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 216a4485d914..f5564aa313f5 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -471,7 +471,7 @@ static noinline_for_stack struct btrfs_backref_node
*build_backref_tree(
int ret;
int err = 0;
- iter = btrfs_backref_iter_alloc(rc->extent_root->fs_info, GFP_NOFS);
+ iter = btrfs_backref_iter_alloc(rc->extent_root->fs_info);
if (!iter)
return ERR_PTR(-ENOMEM);
path = btrfs_alloc_path();
-Anand
> Signed-off-by: David Sterba <dsterba@suse.com>
> ---
> fs/btrfs/backref.c | 5 ++---
> fs/btrfs/backref.h | 3 +--
> 2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
> index e6b69ac1a77c..a5e548f30242 100644
> --- a/fs/btrfs/backref.c
> +++ b/fs/btrfs/backref.c
> @@ -2634,12 +2634,11 @@ void free_ipath(struct inode_fs_paths *ipath)
> kfree(ipath);
> }
>
> -struct btrfs_backref_iter *btrfs_backref_iter_alloc(
> - struct btrfs_fs_info *fs_info, gfp_t gfp_flag)
> +struct btrfs_backref_iter *btrfs_backref_iter_alloc(struct btrfs_fs_info *fs_info)
> {
> struct btrfs_backref_iter *ret;
>
> - ret = kzalloc(sizeof(*ret), gfp_flag);
> + ret = kzalloc(sizeof(*ret), GFP_NOFS);
> if (!ret)
> return NULL;
>
> diff --git a/fs/btrfs/backref.h b/fs/btrfs/backref.h
> index 6dac462430b0..ea8b59a201e6 100644
> --- a/fs/btrfs/backref.h
> +++ b/fs/btrfs/backref.h
> @@ -155,8 +155,7 @@ struct btrfs_backref_iter {
> u32 end_ptr;
> };
>
> -struct btrfs_backref_iter *btrfs_backref_iter_alloc(
> - struct btrfs_fs_info *fs_info, gfp_t gfp_flag);
> +struct btrfs_backref_iter *btrfs_backref_iter_alloc(struct btrfs_fs_info *fs_info);
>
> static inline void btrfs_backref_iter_free(struct btrfs_backref_iter *iter)
> {
next prev parent reply other threads:[~2022-10-20 5:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 14:27 [PATCH 0/4] Parameter cleanup David Sterba
2022-10-18 14:27 ` [PATCH 1/4] btrfs: sink gfp_t parameter to btrfs_backref_iter_alloc David Sterba
2022-10-20 5:56 ` Anand Jain [this message]
2022-10-18 14:27 ` [PATCH 2/4] btrfs: sink gfp_t parameter to btrfs_qgroup_trace_extent David Sterba
2022-10-20 6:01 ` Anand Jain
2022-10-20 16:39 ` David Sterba
2022-10-18 14:27 ` [PATCH 3/4] btrfs: switch GFP_NOFS to GFP_KERNEL in scrub_setup_recheck_block David Sterba
2022-10-20 7:27 ` Anand Jain
2022-10-20 16:35 ` David Sterba
2022-10-21 2:34 ` Anand Jain
2022-10-18 14:27 ` [PATCH 4/4] btrfs: sink gfp_t parameter to alloc_scrub_sector David Sterba
2022-10-20 7:30 ` Anand Jain
2022-10-19 10:28 ` [PATCH 0/4] Parameter cleanup Johannes Thumshirn
2022-10-19 15:16 ` David Sterba
2022-10-19 15:23 ` Johannes Thumshirn
2022-10-19 16:05 ` 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=5507e5e4-e1cf-78d7-d756-59fc8e258a57@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.com \
--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;
as well as URLs for NNTP newsgroup(s).