f2fs: avoid wrong decrypted data from disk
authorJaegeuk Kim <jaegeuk@kernel.org>
Thu, 23 Aug 2018 04:18:00 +0000 (21:18 -0700)
committerJan Altensen <info@stricted.net>
Sun, 14 Jun 2020 09:30:42 +0000 (11:30 +0200)
commit55c21aedd7b7ed694d5db06ce735437dd97e2fe1
treee03b5218b501153eb196b02eb589aa951e716351
parent2b3fcacd1dc804359d19bdb80c04b41af4fae1a0
f2fs: avoid wrong decrypted data from disk

1. Create a file in an encrypted directory
2. Do GC & drop caches
3. Read stale data before its bio for metapage was not issued yet

Mot-CRs-fixed: (CR)

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Git-commit: 0ded69f632bb717be9aeea3ae74e29050fcb060c
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/
[stummala@codeaurora.org: Back port the change]
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Jignesh Patel <jignesh@motorola.com>
Change-Id: I6ca2ad656efd230b20caa2240e681dbb9f145394
Reviewed-on: https://gerrit.mot.com/1526092
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit 150d0b46bfae48f1dc1f8c6cc7706a3fa2db5d09)
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/segment.c