Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt
[sfrench/cifs-2.6.git] / fs / ext4 / page-io.c
index cff4c4aa7a9c2d300c9ac2bc8f50c3981726d4d5..6f5305e9a6acccc62c025caed44f47ded8af9947 100644 (file)
@@ -67,7 +67,7 @@ static void ext4_finish_bio(struct bio *bio)
 
        bio_for_each_segment_all(bvec, bio, i, iter_all) {
                struct page *page = bvec->bv_page;
-#ifdef CONFIG_EXT4_FS_ENCRYPTION
+#ifdef CONFIG_FS_ENCRYPTION
                struct page *data_page = NULL;
 #endif
                struct buffer_head *bh, *head;
@@ -79,7 +79,7 @@ static void ext4_finish_bio(struct bio *bio)
                if (!page)
                        continue;
 
-#ifdef CONFIG_EXT4_FS_ENCRYPTION
+#ifdef CONFIG_FS_ENCRYPTION
                if (!page->mapping) {
                        /* The bounce data pages are unmapped. */
                        data_page = page;
@@ -112,7 +112,7 @@ static void ext4_finish_bio(struct bio *bio)
                bit_spin_unlock(BH_Uptodate_Lock, &head->b_state);
                local_irq_restore(flags);
                if (!under_io) {
-#ifdef CONFIG_EXT4_FS_ENCRYPTION
+#ifdef CONFIG_FS_ENCRYPTION
                        if (data_page)
                                fscrypt_restore_control_page(data_page);
 #endif
@@ -478,8 +478,7 @@ int ext4_bio_write_page(struct ext4_io_submit *io,
 
        bh = head = page_buffers(page);
 
-       if (ext4_encrypted_inode(inode) && S_ISREG(inode->i_mode) &&
-           nr_to_submit) {
+       if (IS_ENCRYPTED(inode) && S_ISREG(inode->i_mode) && nr_to_submit) {
                gfp_t gfp_flags = GFP_NOFS;
 
        retry_encrypt: