From: David Gstir <david@sigma-star.at>
To: linux-mtd@lists.infradead.org
Cc: tytso@mit.edu, dedekind1@gmail.com, ebiggers@google.com,
mhalcrow@google.com, adrian.hunter@intel.com,
linux-kernel@vger.kernel.org, hch@infradead.org,
linux-fsdevel@vger.kernel.org, jaegeuk@kernel.org,
dengler@linutronix.de, sbabic@denx.de, wd@denx.de,
richard@nod.at, David Gstir <david@sigma-star.at>
Subject: [PATCH v2 1/6] fscrypt: Use correct index in decrypt path.
Date: Tue, 6 Dec 2016 23:53:53 +0100 [thread overview]
Message-ID: <20161206225358.12126-2-david@sigma-star.at> (raw)
In-Reply-To: <20161206225358.12126-1-david@sigma-star.at>
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
next prev parent reply other threads:[~2016-12-06 22:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 22:53 [PATCH v2 0/6] UBIFS related fscrypt updates David Gstir
2016-12-06 22:53 ` David Gstir [this message]
2016-12-06 22:53 ` [PATCH v2 2/6] fscrypt: Never allocate fscrypt_ctx on in-place encryption David Gstir
2016-12-06 22:53 ` [PATCH v2 3/6] fscrypt: Cleanup fscrypt_{decrypt,encrypt}_page() David Gstir
2016-12-06 22:53 ` [PATCH v2 4/6] fscrypt: Cleanup page locking requirements for fscrypt_{decrypt,encrypt}_page() David Gstir
2016-12-06 22:53 ` [PATCH v2 5/6] fscrypt: Delay bounce page pool allocation until needed David Gstir
2016-12-06 22:53 ` [PATCH v2 6/6] fscrypt: Rename FS_WRITE_PATH_FL to FS_CTX_HAS_BOUNCE_BUFFER_FL David Gstir
2016-12-13 3:01 ` [PATCH v2 0/6] UBIFS related fscrypt updates Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161206225358.12126-2-david@sigma-star.at \
--to=david@sigma-star.at \
--cc=adrian.hunter@intel.com \
--cc=dedekind1@gmail.com \
--cc=dengler@linutronix.de \
--cc=ebiggers@google.com \
--cc=hch@infradead.org \
--cc=jaegeuk@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mhalcrow@google.com \
--cc=richard@nod.at \
--cc=sbabic@denx.de \
--cc=tytso@mit.edu \
--cc=wd@denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®