diff options
author | Michael Halcrow <mhalcrow@us.ibm.com> | 2007-10-16 04:28:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:43:12 -0400 |
commit | d7cdc5febf9f2664755002c3a2f84bd348389fe9 (patch) | |
tree | ad770ac2031d87474220cc20eb7b99a246dea8bb /fs/ecryptfs/ecryptfs_kernel.h | |
parent | 4981e081cfe2c3f4abcfa3924ebd999cdbed4914 (diff) |
eCryptfs: update metadata read/write functions
Update the metadata read/write functions and grow_file() to use the
read_write.c routines. Do not open another lower file; use the persistent
lower file instead. Provide a separate function for
crypto.c::ecryptfs_read_xattr_region() to get to the lower xattr without
having to go through the eCryptfs getxattr.
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>
Diffstat (limited to 'fs/ecryptfs/ecryptfs_kernel.h')
-rw-r--r-- | fs/ecryptfs/ecryptfs_kernel.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h index 65f7ddfd4d4a..3e52b42fba06 100644 --- a/fs/ecryptfs/ecryptfs_kernel.h +++ b/fs/ecryptfs/ecryptfs_kernel.h | |||
@@ -570,13 +570,11 @@ int ecryptfs_writepage_and_release_lower_page(struct page *lower_page, | |||
570 | struct writeback_control *wbc); | 570 | struct writeback_control *wbc); |
571 | int ecryptfs_encrypt_page(struct page *page); | 571 | int ecryptfs_encrypt_page(struct page *page); |
572 | int ecryptfs_decrypt_page(struct page *page); | 572 | int ecryptfs_decrypt_page(struct page *page); |
573 | int ecryptfs_write_metadata(struct dentry *ecryptfs_dentry, | 573 | int ecryptfs_write_metadata(struct dentry *ecryptfs_dentry); |
574 | struct file *lower_file); | 574 | int ecryptfs_read_metadata(struct dentry *ecryptfs_dentry); |
575 | int ecryptfs_read_metadata(struct dentry *ecryptfs_dentry, | ||
576 | struct file *lower_file); | ||
577 | int ecryptfs_new_file_context(struct dentry *ecryptfs_dentry); | 575 | int ecryptfs_new_file_context(struct dentry *ecryptfs_dentry); |
578 | int ecryptfs_read_and_validate_header_region(char *data, struct dentry *dentry, | 576 | int ecryptfs_read_and_validate_header_region(char *data, |
579 | struct vfsmount *mnt); | 577 | struct inode *ecryptfs_inode); |
580 | int ecryptfs_read_and_validate_xattr_region(char *page_virt, | 578 | int ecryptfs_read_and_validate_xattr_region(char *page_virt, |
581 | struct dentry *ecryptfs_dentry); | 579 | struct dentry *ecryptfs_dentry); |
582 | u16 ecryptfs_code_for_cipher_string(struct ecryptfs_crypt_stat *crypt_stat); | 580 | u16 ecryptfs_code_for_cipher_string(struct ecryptfs_crypt_stat *crypt_stat); |
@@ -599,10 +597,13 @@ int ecryptfs_open_lower_file(struct file **lower_file, | |||
599 | int ecryptfs_close_lower_file(struct file *lower_file); | 597 | int ecryptfs_close_lower_file(struct file *lower_file); |
600 | ssize_t ecryptfs_getxattr(struct dentry *dentry, const char *name, void *value, | 598 | ssize_t ecryptfs_getxattr(struct dentry *dentry, const char *name, void *value, |
601 | size_t size); | 599 | size_t size); |
600 | ssize_t | ||
601 | ecryptfs_getxattr_lower(struct dentry *lower_dentry, const char *name, | ||
602 | void *value, size_t size); | ||
602 | int | 603 | int |
603 | ecryptfs_setxattr(struct dentry *dentry, const char *name, const void *value, | 604 | ecryptfs_setxattr(struct dentry *dentry, const char *name, const void *value, |
604 | size_t size, int flags); | 605 | size_t size, int flags); |
605 | int ecryptfs_read_xattr_region(char *page_virt, struct dentry *ecryptfs_dentry); | 606 | int ecryptfs_read_xattr_region(char *page_virt, struct inode *ecryptfs_inode); |
606 | int ecryptfs_process_helo(unsigned int transport, uid_t uid, pid_t pid); | 607 | int ecryptfs_process_helo(unsigned int transport, uid_t uid, pid_t pid); |
607 | int ecryptfs_process_quit(uid_t uid, pid_t pid); | 608 | int ecryptfs_process_quit(uid_t uid, pid_t pid); |
608 | int ecryptfs_process_response(struct ecryptfs_message *msg, uid_t uid, | 609 | int ecryptfs_process_response(struct ecryptfs_message *msg, uid_t uid, |