summaryrefslogtreecommitdiffstats
path: root/fs/ext4/page-io.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-03-09 13:54:24 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-09 13:54:24 -0500
commitd1cae94871330cb9f5fdcea34529abf7917e682e (patch)
tree727bdda6b15bc1252c61eff0d77395e8c02d56c1 /fs/ext4/page-io.c
parent99b25a7fc6150d613be8eab71a47e6c0fcc8d7c5 (diff)
parent129ca2d2a83f44551e73a408fa5e75a7b5169abb (diff)
Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt
Pull fscrypt updates from Eric Biggers: "First: Ted, Jaegeuk, and I have decided to add me as a co-maintainer for fscrypt, and we're now using a shared git tree. So we've updated MAINTAINERS accordingly, and I'm doing the pull request this time. The actual changes for v5.1 are: - Remove the fs-specific kconfig options like CONFIG_EXT4_ENCRYPTION and make fscrypt support for all fscrypt-capable filesystems be controlled by CONFIG_FS_ENCRYPTION, similar to how CONFIG_QUOTA works. - Improve error code for rename() and link() into encrypted directories. - Various cleanups" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: MAINTAINERS: add Eric Biggers as an fscrypt maintainer fscrypt: return -EXDEV for incompatible rename or link into encrypted dir fscrypt: remove filesystem specific build config option f2fs: use IS_ENCRYPTED() to check encryption status ext4: use IS_ENCRYPTED() to check encryption status fscrypt: remove CRYPTO_CTR dependency
Diffstat (limited to 'fs/ext4/page-io.c')
-rw-r--r--fs/ext4/page-io.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index cff4c4aa7a9c..6f5305e9a6ac 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -67,7 +67,7 @@ static void ext4_finish_bio(struct bio *bio)
67 67
68 bio_for_each_segment_all(bvec, bio, i, iter_all) { 68 bio_for_each_segment_all(bvec, bio, i, iter_all) {
69 struct page *page = bvec->bv_page; 69 struct page *page = bvec->bv_page;
70#ifdef CONFIG_EXT4_FS_ENCRYPTION 70#ifdef CONFIG_FS_ENCRYPTION
71 struct page *data_page = NULL; 71 struct page *data_page = NULL;
72#endif 72#endif
73 struct buffer_head *bh, *head; 73 struct buffer_head *bh, *head;
@@ -79,7 +79,7 @@ static void ext4_finish_bio(struct bio *bio)
79 if (!page) 79 if (!page)
80 continue; 80 continue;
81 81
82#ifdef CONFIG_EXT4_FS_ENCRYPTION 82#ifdef CONFIG_FS_ENCRYPTION
83 if (!page->mapping) { 83 if (!page->mapping) {
84 /* The bounce data pages are unmapped. */ 84 /* The bounce data pages are unmapped. */
85 data_page = page; 85 data_page = page;
@@ -112,7 +112,7 @@ static void ext4_finish_bio(struct bio *bio)
112 bit_spin_unlock(BH_Uptodate_Lock, &head->b_state); 112 bit_spin_unlock(BH_Uptodate_Lock, &head->b_state);
113 local_irq_restore(flags); 113 local_irq_restore(flags);
114 if (!under_io) { 114 if (!under_io) {
115#ifdef CONFIG_EXT4_FS_ENCRYPTION 115#ifdef CONFIG_FS_ENCRYPTION
116 if (data_page) 116 if (data_page)
117 fscrypt_restore_control_page(data_page); 117 fscrypt_restore_control_page(data_page);
118#endif 118#endif
@@ -478,8 +478,7 @@ int ext4_bio_write_page(struct ext4_io_submit *io,
478 478
479 bh = head = page_buffers(page); 479 bh = head = page_buffers(page);
480 480
481 if (ext4_encrypted_inode(inode) && S_ISREG(inode->i_mode) && 481 if (IS_ENCRYPTED(inode) && S_ISREG(inode->i_mode) && nr_to_submit) {
482 nr_to_submit) {
483 gfp_t gfp_flags = GFP_NOFS; 482 gfp_t gfp_flags = GFP_NOFS;
484 483
485 retry_encrypt: 484 retry_encrypt: