lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 29 Jan 2020 17:20:34 +0100 From: Jan Kara <jack@...e.cz> To: Liu Song <fishland@...yun.com> Cc: tytso@....edu, jack@...e.com, linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org, liu.song11@....com.cn Subject: Re: [RFC PATCH] jbd2: no need to repeat in jbd2_journal_add_journal_head On Wed 29-01-20 17:57:00, Liu Song wrote: > From: Liu Song <liu.song11@....com.cn> > > In "journal_alloc_journal_head" use "GFP_NOFS | __GFP_NOFAIL" > as the alloc flag, so it will retry until memory allocation > is successful. Then we do not need to do extra repeat. > > Signed-off-by: Liu Song <liu.song11@....com.cn> Thanks for the patch. It looks good. You can add: Reviewed-by: Jan Kara <jack@...e.cz> Honza > --- > fs/jbd2/journal.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c > index 5e408ee24a1a..1a9aaf07cecd 100644 > --- a/fs/jbd2/journal.c > +++ b/fs/jbd2/journal.c > @@ -2503,7 +2503,6 @@ struct journal_head *jbd2_journal_add_journal_head(struct buffer_head *bh) > struct journal_head *jh; > struct journal_head *new_jh = NULL; > > -repeat: > if (!buffer_jbd(bh)) > new_jh = journal_alloc_journal_head(); > > @@ -2515,11 +2514,6 @@ struct journal_head *jbd2_journal_add_journal_head(struct buffer_head *bh) > (atomic_read(&bh->b_count) > 0) || > (bh->b_page && bh->b_page->mapping)); > > - if (!new_jh) { > - jbd_unlock_bh_journal_head(bh); > - goto repeat; > - } > - > jh = new_jh; > new_jh = NULL; /* We consumed it */ > set_buffer_jbd(bh); > -- > 2.20.1 > -- Jan Kara <jack@...e.com> SUSE Labs, CR
Powered by blists - more mailing lists