summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/data.c
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2016-01-08 13:19:27 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2016-01-08 20:51:58 +0100
commitda5af127a1a17bac121c6889c88cc90f8a278a84 (patch)
treec579d96c259ba77d926f1cccc736dc090acc8772 /fs/f2fs/data.c
parentf2fs: clean up f2fs_balance_fs (diff)
downloadlinux-da5af127a1a17bac121c6889c88cc90f8a278a84.tar.xz
linux-da5af127a1a17bac121c6889c88cc90f8a278a84.zip
f2fs: recognize encrypted data in f2fs_fiemap
This patch fixes to teach f2fs_fiemap to recognize encrypted data. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r--fs/f2fs/data.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 6fae75ddae6d..a3bce12b0cce 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -830,9 +830,13 @@ next:
flags |= FIEMAP_EXTENT_LAST;
}
- if (size)
+ if (size) {
+ if (f2fs_encrypted_inode(inode))
+ flags |= FIEMAP_EXTENT_DATA_ENCRYPTED;
+
ret = fiemap_fill_next_extent(fieinfo, logical,
phys, size, flags);
+ }
if (start_blk > last_blk || ret)
goto out;