From: Michael Halcrow Date: Mon, 5 Nov 2007 22:51:03 +0000 (-0800) Subject: eCryptfs: increment extent_offset once per loop interation X-Git-Tag: v5.15~44166 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=778d1a2bd42ae862a6c6d20a1c3af5e45b3c1924;p=mirror_ubuntu-kernels.git 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: Michael Halcrow Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index 9d70289f7df3..9ea4769fbb66 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c @@ -504,7 +504,6 @@ int ecryptfs_encrypt_page(struct page *page) "\n", rc); goto out; } - extent_offset++; } out: kfree(enc_extent_virt); @@ -640,7 +639,6 @@ int ecryptfs_decrypt_page(struct page *page) "rc = [%d]\n", __FUNCTION__, rc); goto out; } - extent_offset++; } out: kfree(enc_extent_virt);