diff options
Diffstat (limited to 'fs/ecryptfs/mmap.c')
-rw-r--r-- | fs/ecryptfs/mmap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c index f5f962d7a123..3014aa719953 100644 --- a/fs/ecryptfs/mmap.c +++ b/fs/ecryptfs/mmap.c | |||
@@ -295,8 +295,8 @@ static int ecryptfs_readpage(struct file *file, struct page *page) | |||
295 | crypt_stat = &ecryptfs_inode_to_private(file->f_path.dentry->d_inode) | 295 | crypt_stat = &ecryptfs_inode_to_private(file->f_path.dentry->d_inode) |
296 | ->crypt_stat; | 296 | ->crypt_stat; |
297 | if (!crypt_stat | 297 | if (!crypt_stat |
298 | || !ECRYPTFS_CHECK_FLAG(crypt_stat->flags, ECRYPTFS_ENCRYPTED) | 298 | || !(crypt_stat->flags & ECRYPTFS_ENCRYPTED) |
299 | || ECRYPTFS_CHECK_FLAG(crypt_stat->flags, ECRYPTFS_NEW_FILE)) { | 299 | || (crypt_stat->flags & ECRYPTFS_NEW_FILE)) { |
300 | ecryptfs_printk(KERN_DEBUG, | 300 | ecryptfs_printk(KERN_DEBUG, |
301 | "Passing through unencrypted page\n"); | 301 | "Passing through unencrypted page\n"); |
302 | rc = ecryptfs_do_readpage(file, page, page->index); | 302 | rc = ecryptfs_do_readpage(file, page, page->index); |
@@ -657,10 +657,10 @@ static int ecryptfs_commit_write(struct file *file, struct page *page, | |||
657 | mutex_lock(&lower_inode->i_mutex); | 657 | mutex_lock(&lower_inode->i_mutex); |
658 | crypt_stat = &ecryptfs_inode_to_private(file->f_path.dentry->d_inode) | 658 | crypt_stat = &ecryptfs_inode_to_private(file->f_path.dentry->d_inode) |
659 | ->crypt_stat; | 659 | ->crypt_stat; |
660 | if (ECRYPTFS_CHECK_FLAG(crypt_stat->flags, ECRYPTFS_NEW_FILE)) { | 660 | if (crypt_stat->flags & ECRYPTFS_NEW_FILE) { |
661 | ecryptfs_printk(KERN_DEBUG, "ECRYPTFS_NEW_FILE flag set in " | 661 | ecryptfs_printk(KERN_DEBUG, "ECRYPTFS_NEW_FILE flag set in " |
662 | "crypt_stat at memory location [%p]\n", crypt_stat); | 662 | "crypt_stat at memory location [%p]\n", crypt_stat); |
663 | ECRYPTFS_CLEAR_FLAG(crypt_stat->flags, ECRYPTFS_NEW_FILE); | 663 | crypt_stat->flags &= ~(ECRYPTFS_NEW_FILE); |
664 | } else | 664 | } else |
665 | ecryptfs_printk(KERN_DEBUG, "Not a new file\n"); | 665 | ecryptfs_printk(KERN_DEBUG, "Not a new file\n"); |
666 | ecryptfs_printk(KERN_DEBUG, "Calling fill_zeros_to_end_of_page" | 666 | ecryptfs_printk(KERN_DEBUG, "Calling fill_zeros_to_end_of_page" |