[PATCH 2/3] eCryptfs: Increment extent_offset once per loop interation

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Michael Halcrow
Date: Friday, November 2, 2007 - 11:52 am

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>
---
 fs/ecryptfs/crypto.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
index ca0dfea..4f14d4c 100644
--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -503,7 +503,6 @@ int ecryptfs_encrypt_page(struct page *page)
 					"\n", rc);
 			goto out;
 		}
-		extent_offset++;
 	}
 out:
 	kfree(enc_extent_virt);
@@ -639,7 +638,6 @@ int ecryptfs_decrypt_page(struct page *page)
 			       "rc = [%d]\n", __FUNCTION__, rc);
 			goto out;
 		}
-		extent_offset++;
 	}
 out:
 	kfree(enc_extent_virt);
-- 
1.5.0.6

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/3] eCryptfs: Track header bytes rather than extents, Michael Halcrow, (Fri Nov 2, 11:51 am)
[PATCH 2/3] eCryptfs: Increment extent_offset once per loo ..., Michael Halcrow, (Fri Nov 2, 11:52 am)