summaryrefslogtreecommitdiffstats
path: root/fs/crypto
diff options
context:
space:
mode:
authorDavid Gstir <david@sigma-star.at>2016-12-06 23:53:53 +0100
committerTheodore Ts'o <tytso@mit.edu>2016-12-11 16:26:10 -0500
commite550c16c8aab95c7996b0c864d5fcedc2c430a43 (patch)
tree9d6cfced5217cfb73216d883385795a7b4983bd9 /fs/crypto
parent41d5319af3368127b55f6587f1c747dd6a7b9b04 (diff)
downloadlinux-e550c16c8aab95c7996b0c864d5fcedc2c430a43.tar.gz
linux-e550c16c8aab95c7996b0c864d5fcedc2c430a43.tar.bz2
linux-e550c16c8aab95c7996b0c864d5fcedc2c430a43.zip
fscrypt: Use correct index in decrypt path.
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> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/crypto')
-rw-r--r--fs/crypto/crypto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c
index 4d9d221b1d60..d19a42f3a983 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);