From: "jon ernst" <jonernst07@gmx.com>
To: linux-ext4@vger.kernel.org
Subject: [PATCH] ext4: deleted unnecessary assignments and useless "if" statement
Date: Thu, 20 Jun 2013 01:44:56 -0400 [thread overview]
Message-ID: <20130620054456.271300@gmx.com> (raw)
comparing unsigned variable with 0 always return false.
err = 0 is duplicated and unnecessary.
Signed-off-by: "Jon Ernst" <jonernst07@gmx.com>
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1098,8 +1098,6 @@ static int ext4_write_end(struct file *f
if (i_size_changed)
ext4_mark_inode_dirty(handle, inode);
- if (copied < 0)
- ret = copied;
if (pos + len > inode->i_size && ext4_can_truncate(inode))
/* if we have allocated more blocks and copied
* less. We will have blocks allocated outside
@@ -3365,7 +3363,6 @@ int ext4_block_zero_page_range(handle_t
pos += blocksize;
}
- err = 0;
if (buffer_freed(bh)) {
BUFFER_TRACE(bh, "freed: skip");
goto unlock;
@@ -3405,7 +3402,6 @@ int ext4_block_zero_page_range(handle_t
BUFFER_TRACE(bh, "zeroed end of block");
- err = 0;
if (ext4_should_journal_data(inode)) {
err = ext4_handle_dirty_metadata(handle, inode, bh);
} else {
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2013-06-20 5:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-20 5:44 jon ernst [this message]
2013-06-20 14:44 ` [PATCH] ext4: deleted unnecessary assignments and useless "if" statement Theodore Ts'o
2013-06-20 14:52 ` [PATCH] ext4: check error return from ext4_write_inline_data_end() Theodore Ts'o
2013-06-20 19:45 ` [PATCH -v3] ext4: delete unnecessary C statements Theodore Ts'o
2013-06-24 13:52 ` Zheng Liu
2013-06-24 13:40 ` [PATCH] ext4: check error return from ext4_write_inline_data_end() Zheng Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130620054456.271300@gmx.com \
--to=jonernst07@gmx.com \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).