eCryptfs: increment extent_offset once per loop interation
authorMichael Halcrow <mhalcrow@us.ibm.com>
Mon, 5 Nov 2007 22:51:03 +0000 (14:51 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 5 Nov 2007 23:12:33 +0000 (15:12 -0800)
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 <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ecryptfs/crypto.c

index 9d70289f7df328022e050bbcb3723923524c562f..9ea4769fbb668bee43ef8caf27894ae4ebdf55c7 100644 (file)
@@ -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);