ext3: remove an unneeded check in ext3_new_blocks()
PATCH 1/1 ext3: remove an unneeded check in ext3_new_blocks()
We know "fatal" is zero here. The code can be simplified a bit by assigning directly.
Signed-off-by Dan Carpenter <[email protected]>
fs/ext3/balloc.c +1 -4
@@ -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;
Quoted 4 lines · Dan Carpenter
We know "fatal" is zero here. The code can be simplified a bit by assigning directly.
Signed-off-by Dan Carpenter <[email protected]>
Thanks. Added to my tree.
Honza
Quoted 17 lines
fs/ext3/balloc.c +1
-4@@ -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;
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR