summaryrefslogtreecommitdiff
path: root/fs/overlayfs
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@mykernel.net>2020-06-24 18:20:11 +0800
committerMiklos Szeredi <mszeredi@redhat.com>2020-11-12 11:31:56 +0100
commitc11faf32599fee59f33896c8d59f9b3c17ca76fc (patch)
treed9f21d20ba852e3924741a11b31845b15c60e8f8 /fs/overlayfs
parentcef4cbff06fbc3be54d6d79ee139edecc2ee8598 (diff)
ovl: fix incorrect extent info in metacopy case
In metacopy case, we should use ovl_inode_realdata() instead of ovl_inode_real() to get real inode which has data, so that we can get correct information of extentes in ->fiemap operation. Signed-off-by: Chengguang Xu <cgxu519@mykernel.net> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs')
-rw-r--r--fs/overlayfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
index b584dca845ba..1688ae7e3438 100644
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@ -476,7 +476,7 @@ static int ovl_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
u64 start, u64 len)
{
int err;
- struct inode *realinode = ovl_inode_real(inode);
+ struct inode *realinode = ovl_inode_realdata(inode);
const struct cred *old_cred;
if (!realinode->i_op->fiemap)