* [patch] ext3: remove an unneeded check in ext3_new_blocks()
@ 2014-02-25 8:39 Dan Carpenter
2014-02-25 9:49 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-02-25 8:39 UTC (permalink / raw)
To: Jan Kara; +Cc: Andrew Morton, Andreas Dilger, linux-ext4, kernel-janitors
We know "fatal" is zero here. The code can be simplified a bit by
assigning directly.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
index 22548f56197b..158b5d4ce067 100644
--- a/fs/ext3/balloc.c
+++ b/fs/ext3/balloc.c
@@ -1727,10 +1727,7 @@ allocated:
percpu_counter_sub(&sbi->s_freeblocks_counter, num);
BUFFER_TRACE(gdp_bh, "journal_dirty_metadata for group descriptor");
- err = ext3_journal_dirty_metadata(handle, gdp_bh);
- if (!fatal)
- fatal = err;
-
+ fatal = ext3_journal_dirty_metadata(handle, gdp_bh);
if (fatal)
goto out;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] ext3: remove an unneeded check in ext3_new_blocks()
2014-02-25 8:39 [patch] ext3: remove an unneeded check in ext3_new_blocks() Dan Carpenter
@ 2014-02-25 9:49 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2014-02-25 9:49 UTC (permalink / raw)
To: Dan Carpenter
Cc: Jan Kara, Andrew Morton, Andreas Dilger, linux-ext4,
kernel-janitors
On Tue 25-02-14 11:39:45, Dan Carpenter wrote:
> We know "fatal" is zero here. The code can be simplified a bit by
> assigning directly.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks. Added to my tree.
Honza
>
> diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
> index 22548f56197b..158b5d4ce067 100644
> --- a/fs/ext3/balloc.c
> +++ b/fs/ext3/balloc.c
> @@ -1727,10 +1727,7 @@ allocated:
> percpu_counter_sub(&sbi->s_freeblocks_counter, num);
>
> BUFFER_TRACE(gdp_bh, "journal_dirty_metadata for group descriptor");
> - err = ext3_journal_dirty_metadata(handle, gdp_bh);
> - if (!fatal)
> - fatal = err;
> -
> + fatal = ext3_journal_dirty_metadata(handle, gdp_bh);
> if (fatal)
> goto out;
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-25 9:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-25 8:39 [patch] ext3: remove an unneeded check in ext3_new_blocks() Dan Carpenter
2014-02-25 9:49 ` Jan Kara
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).