From: Chao Yu Date: Fri, 8 Jan 2016 12:19:27 +0000 (+0800) Subject: f2fs: recognize encrypted data in f2fs_fiemap X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=da5af127a1a17bac121c6889c88cc90f8a278a84;p=openwrt%2Fstaging%2Fblogic.git f2fs: recognize encrypted data in f2fs_fiemap This patch fixes to teach f2fs_fiemap to recognize encrypted data. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- 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;