diff options
| author | Steve French <sfrench@us.ibm.com> | 2009-04-30 11:36:52 -0400 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2009-04-30 11:36:52 -0400 |
| commit | 912bc6ae3de99c7bada4577d4341ace4ee59b5be (patch) | |
| tree | 28fd1a4bb9e4b05aa833285b46df169f12c0e24d /fs/ecryptfs/crypto.c | |
| parent | d37dc42ab6f040b8f0f2962ab219c5b2accf748d (diff) | |
| parent | 091438dd5668396328a3419abcbc6591159eb8d1 (diff) | |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/ecryptfs/crypto.c')
| -rw-r--r-- | fs/ecryptfs/crypto.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index 8b65f289ee00..b91851f1cda3 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c | |||
| @@ -483,15 +483,7 @@ int ecryptfs_encrypt_page(struct page *page) | |||
| 483 | ecryptfs_inode = page->mapping->host; | 483 | ecryptfs_inode = page->mapping->host; |
| 484 | crypt_stat = | 484 | crypt_stat = |
| 485 | &(ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat); | 485 | &(ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat); |
| 486 | if (!(crypt_stat->flags & ECRYPTFS_ENCRYPTED)) { | 486 | BUG_ON(!(crypt_stat->flags & ECRYPTFS_ENCRYPTED)); |
| 487 | rc = ecryptfs_write_lower_page_segment(ecryptfs_inode, page, | ||
| 488 | 0, PAGE_CACHE_SIZE); | ||
| 489 | if (rc) | ||
| 490 | printk(KERN_ERR "%s: Error attempting to copy " | ||
| 491 | "page at index [%ld]\n", __func__, | ||
| 492 | page->index); | ||
| 493 | goto out; | ||
| 494 | } | ||
| 495 | enc_extent_page = alloc_page(GFP_USER); | 487 | enc_extent_page = alloc_page(GFP_USER); |
| 496 | if (!enc_extent_page) { | 488 | if (!enc_extent_page) { |
| 497 | rc = -ENOMEM; | 489 | rc = -ENOMEM; |
| @@ -620,16 +612,7 @@ int ecryptfs_decrypt_page(struct page *page) | |||
| 620 | ecryptfs_inode = page->mapping->host; | 612 | ecryptfs_inode = page->mapping->host; |
| 621 | crypt_stat = | 613 | crypt_stat = |
| 622 | &(ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat); | 614 | &(ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat); |
| 623 | if (!(crypt_stat->flags & ECRYPTFS_ENCRYPTED)) { | 615 | BUG_ON(!(crypt_stat->flags & ECRYPTFS_ENCRYPTED)); |
| 624 | rc = ecryptfs_read_lower_page_segment(page, page->index, 0, | ||
| 625 | PAGE_CACHE_SIZE, | ||
| 626 | ecryptfs_inode); | ||
| 627 | if (rc) | ||
| 628 | printk(KERN_ERR "%s: Error attempting to copy " | ||
| 629 | "page at index [%ld]\n", __func__, | ||
| 630 | page->index); | ||
| 631 | goto out; | ||
| 632 | } | ||
| 633 | enc_extent_page = alloc_page(GFP_USER); | 616 | enc_extent_page = alloc_page(GFP_USER); |
| 634 | if (!enc_extent_page) { | 617 | if (!enc_extent_page) { |
| 635 | rc = -ENOMEM; | 618 | rc = -ENOMEM; |
