aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/readpage.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/readpage.c')
-rw-r--r--fs/ext4/readpage.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c
index e53639784892..3adadf461825 100644
--- a/fs/ext4/readpage.c
+++ b/fs/ext4/readpage.c
@@ -49,7 +49,7 @@
49 49
50static inline bool ext4_bio_encrypted(struct bio *bio) 50static inline bool ext4_bio_encrypted(struct bio *bio)
51{ 51{
52#ifdef CONFIG_EXT4_FS_ENCRYPTION 52#ifdef CONFIG_FS_ENCRYPTION
53 return unlikely(bio->bi_private != NULL); 53 return unlikely(bio->bi_private != NULL);
54#else 54#else
55 return false; 55 return false;
@@ -243,8 +243,7 @@ int ext4_mpage_readpages(struct address_space *mapping,
243 if (bio == NULL) { 243 if (bio == NULL) {
244 struct fscrypt_ctx *ctx = NULL; 244 struct fscrypt_ctx *ctx = NULL;
245 245
246 if (ext4_encrypted_inode(inode) && 246 if (IS_ENCRYPTED(inode) && S_ISREG(inode->i_mode)) {
247 S_ISREG(inode->i_mode)) {
248 ctx = fscrypt_get_ctx(inode, GFP_NOFS); 247 ctx = fscrypt_get_ctx(inode, GFP_NOFS);
249 if (IS_ERR(ctx)) 248 if (IS_ERR(ctx))
250 goto set_error_page; 249 goto set_error_page;