eCryptfs: remove unnecessary page decrypt call
The page decrypt calls in ecryptfs_write() are both pointless and buggy. Pointless because ecryptfs_get_locked_page() has already brought the page up to date, and buggy because prior mmap writes will just be blown away by the decrypt call. This patch also removes the declaration of a now-nonexistent function ecryptfs_write_zeros(). Thanks to Eric Sandeen and David Kleikamp for helping to track this down. Eric said: fsx w/ mmap dies quickly ( < 100 ops) without this, and survives nicely (to millions of ops+) with it in place. Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com> Cc: Eric Sandeen <sandeen@redhat.com> Cc: Dave Kleikamp <shaggy@austin.ibm.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
c45dcabd26
commit
d3e49afbb6
@@ -660,8 +660,6 @@ int ecryptfs_get_tfm_and_mutex_for_cipher_name(struct crypto_blkcipher **tfm,
|
||||
int ecryptfs_keyring_auth_tok_for_sig(struct key **auth_tok_key,
|
||||
struct ecryptfs_auth_tok **auth_tok,
|
||||
char *sig);
|
||||
int ecryptfs_write_zeros(struct file *file, pgoff_t index, int start,
|
||||
int num_zeros);
|
||||
int ecryptfs_write_lower(struct inode *ecryptfs_inode, char *data,
|
||||
loff_t offset, size_t size);
|
||||
int ecryptfs_write_lower_page_segment(struct inode *ecryptfs_inode,
|
||||
|
Reference in New Issue
Block a user