Commit 778d1a2b authored by Michael Halcrow's avatar Michael Halcrow Committed by Linus Torvalds

eCryptfs: increment extent_offset once per loop interation

The extent_offset is getting incremented twice per loop iteration through any
given page.  It should only be getting incremented once.  This bug should only
impact hosts with >4K page sizes.
Signed-off-by: default avatarMichael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 01aae971
...@@ -504,7 +504,6 @@ int ecryptfs_encrypt_page(struct page *page) ...@@ -504,7 +504,6 @@ int ecryptfs_encrypt_page(struct page *page)
"\n", rc); "\n", rc);
goto out; goto out;
} }
extent_offset++;
} }
out: out:
kfree(enc_extent_virt); kfree(enc_extent_virt);
...@@ -640,7 +639,6 @@ int ecryptfs_decrypt_page(struct page *page) ...@@ -640,7 +639,6 @@ int ecryptfs_decrypt_page(struct page *page)
"rc = [%d]\n", __FUNCTION__, rc); "rc = [%d]\n", __FUNCTION__, rc);
goto out; goto out;
} }
extent_offset++;
} }
out: out:
kfree(enc_extent_virt); kfree(enc_extent_virt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment