f2fs/crypto: fix xts_tweak initialization
Changes
1 files changed · +1 −1
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| fs/crypto/crypto.c | modified | +1 | −1 | View file |
fs/crypto/crypto.c
View filediff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c
index aed9ccc..06cd1a2 100644
--- a/fs/crypto/crypto.c
+++ b/fs/crypto/crypto.c
@@ -170,7 +170,7 @@ static int do_page_crypto(struct inode *inode,
fscrypt_complete, &ecr);
BUILD_BUG_ON(FS_XTS_TWEAK_SIZE < sizeof(index));
- memcpy(xts_tweak, &inode->i_ino, sizeof(index));
+ memcpy(xts_tweak, &index, sizeof(index));
memset(&xts_tweak[sizeof(index)], 0,
FS_XTS_TWEAK_SIZE - sizeof(index));