Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1537315

[PATCH v2 1/6] fscrypt: Use correct index in decrypt path.

From David Gstir <david@sigma-star.at>
Newsgroups linux.kernel
Subject [PATCH v2 1/6] fscrypt: Use correct index in decrypt path.
Date 2016-12-07 00:00 +0100
Message-ID <sLwSm-8cn-27@gated-at.bofh.it> (permalink)
References <sLwSl-8cn-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Actually use the fs-provided index instead of always using page->index
which is only set for page-cache pages.

Fixes: 9c4bb8a3a9b4 ("fscrypt: Let fs select encryption index/tweak")

Signed-off-by: David Gstir <david@sigma-star.at>
---
 fs/crypto/crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c
index b6029785714c..3c1124beae28 100644
--- a/fs/crypto/crypto.c
+++ b/fs/crypto/crypto.c
@@ -296,7 +296,7 @@ EXPORT_SYMBOL(fscrypt_encrypt_page);
 int fscrypt_decrypt_page(const struct inode *inode, struct page *page,
 			unsigned int len, unsigned int offs, pgoff_t index)
 {
-	return do_page_crypto(inode, FS_DECRYPT, page->index, page, page, len, offs,
+	return do_page_crypto(inode, FS_DECRYPT, index, page, page, len, offs,
 			GFP_NOFS);
 }
 EXPORT_SYMBOL(fscrypt_decrypt_page);
-- 
2.10.1

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/6] UBIFS related fscrypt updates David Gstir <david@sigma-star.at> - 2016-12-07 00:00 +0100
  [PATCH v2 6/6] fscrypt: Rename FS_WRITE_PATH_FL to FS_CTX_HAS_BOUNCE_BUFFER_FL David Gstir <david@sigma-star.at> - 2016-12-07 00:00 +0100
  [PATCH v2 5/6] fscrypt: Delay bounce page pool allocation until needed David Gstir <david@sigma-star.at> - 2016-12-07 00:00 +0100
  [PATCH v2 3/6] fscrypt: Cleanup fscrypt_{decrypt,encrypt}_page() David Gstir <david@sigma-star.at> - 2016-12-07 00:00 +0100
  [PATCH v2 1/6] fscrypt: Use correct index in decrypt path. David Gstir <david@sigma-star.at> - 2016-12-07 00:00 +0100

csiph-web