[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zsyx3m-J1U4XF5bX@tiehlicka>
Date: Mon, 26 Aug 2024 18:48:30 +0200
From: Michal Hocko <mhocko@...e.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Christoph Hellwig <hch@....de>, Yafang Shao <laoar.shao@...il.com>,
Kent Overstreet <kent.overstreet@...ux.dev>, jack@...e.cz,
Christian Brauner <brauner@...nel.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Paul Moore <paul@...l-moore.com>, James Morris <jmorris@...ei.org>,
"Serge E. Hallyn" <serge@...lyn.com>, linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org, linux-bcachefs@...r.kernel.org,
linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] bcachefs: do not use PF_MEMALLOC_NORECLAIM
On Mon 26-08-24 14:11:39, Matthew Wilcox wrote:
> On Mon, Aug 26, 2024 at 10:47:12AM +0200, Michal Hocko wrote:
> > @@ -258,12 +258,10 @@ static struct bch_inode_info *__bch2_new_inode(struct bch_fs *c)
> > */
> > static struct bch_inode_info *bch2_new_inode(struct btree_trans *trans)
> > {
> > - struct bch_inode_info *inode =
> > - memalloc_flags_do(PF_MEMALLOC_NORECLAIM|PF_MEMALLOC_NOWARN,
> > - __bch2_new_inode(trans->c));
> > + struct bch_inode_info *inode = __bch2_new_inode(trans->c, GFP_NOWARN | GFP_NOWAIT);
>
> GFP_NOWAIT include GFP_NOWARN these days (since 16f5dfbc851b)
Ohh, I was not aware of that. I will drop NOWARN then.
> > +++ b/fs/inode.c
> > @@ -153,7 +153,7 @@ static int no_open(struct inode *inode, struct file *file)
> > * These are initializations that need to be done on every inode
> > * allocation as the fields are not initialised by slab allocation.
> > */
> > -int inode_init_always(struct super_block *sb, struct inode *inode)
> > +int inode_init_always(struct super_block *sb, struct inode *inode, gfp_t gfp)
>
> Did you send the right version of this patch? There should be a "_gfp"
> appended to this function name.
yes, screw up on my end.
> > +++ b/include/linux/fs.h
> > @@ -3027,7 +3027,12 @@ extern loff_t default_llseek(struct file *file, loff_t offset, int whence);
> >
> > extern loff_t vfs_llseek(struct file *file, loff_t offset, int whence);
> >
> > -extern int inode_init_always(struct super_block *, struct inode *);
> > +extern int inode_init_always_gfp(struct super_block *, struct inode *, gfp_t);
>
> You can drop the "extern" while you're changing this line.
OK, I can. I just kept the usual style in this file.
Thanks!
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists