ecryptfs_write_begin(mmap.c) 1 ... 2 if (index != 0) { 3 if (prev_page_end_size > i_size_read(page->mapping->host)) { 4 ... 5 } 6 ... 7 } The IF statement in line 2 is redundant since the IF statement in line 3 deduces that. Signed-off-by: Li Wang <liwang@xxxxxxxxxxx> --- fs/ecryptfs/mmap.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c index 27c0da8..59a8e57 100644 --- a/fs/ecryptfs/mmap.c +++ b/fs/ecryptfs/mmap.c @@ -368,8 +368,7 @@ static int ecryptfs_write_begin(struct file *file, } /* If creating a page or more of holes, zero them out via truncate. * Note, this will increase i_size. */ - if (index != 0) { - if (prev_page_end_size > i_size_read(page->mapping->host)) { + if (prev_page_end_size > i_size_read(page->mapping->host)) { rc = ecryptfs_truncate(file->f_path.dentry, prev_page_end_size); if (rc) { @@ -379,7 +378,6 @@ static int ecryptfs_write_begin(struct file *file, prev_page_end_size, rc); goto out; } - } } out: if (unlikely(rc)) { -- 1.7.6.5 -- To unsubscribe from this list: send the line "unsubscribe ecryptfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html