From: Dan Carpenter Date: Fri, 21 Feb 2014 08:58:54 +0000 (+0300) Subject: ext3: remove unneeded check in ext3_ordered_writepage() X-Git-Tag: firefly_0821_release~176^2~4107^2~10 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f8cb556fdbc36855ef884061a1beec6124314c89;p=firefly-linux-kernel-4.4.55.git ext3: remove unneeded check in ext3_ordered_writepage() We already know "ret" is zero so there is no need to do: if (!ret) ret = err; We can just assign ret directly instead. Signed-off-by: Dan Carpenter Signed-off-by: Jan Kara --- diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index 384b6ebb655f..491f022c476a 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c @@ -1673,12 +1673,9 @@ static int ext3_ordered_writepage(struct page *page, * block_write_full_page() succeeded. Otherwise they are unmapped, * and generally junk. */ - if (ret == 0) { - err = walk_page_buffers(handle, page_bufs, 0, PAGE_CACHE_SIZE, + if (ret == 0) + ret = walk_page_buffers(handle, page_bufs, 0, PAGE_CACHE_SIZE, NULL, journal_dirty_data_fn); - if (!ret) - ret = err; - } walk_page_buffers(handle, page_bufs, 0, PAGE_CACHE_SIZE, NULL, bput_one); err = ext3_journal_stop(handle);