Patchwork ext4: deleted unnecessary assignments and useless "if" statement

login
register
mail settings
Submitter jon ernst
Date June 20, 2013, 5:44 a.m.
Message ID <20130620054456.271300@gmx.com>
Download mbox | patch
Permalink /patch/252753/
State Superseded
Headers show

Comments

jon ernst - June 20, 2013, 5:44 a.m.
comparing unsigned variable with 0 always return false.
err = 0 is duplicated and unnecessary.

Signed-off-by: "Jon Ernst" <jonernst07@gmx.com>

--
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

Patch

--- 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 {