Skip to content

Commit

Permalink
ovl: fix incorrect extent info in metacopy case
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cgxu519 authored and Miklos Szeredi committed Nov 12, 2020
1 parent cef4cbf commit c11faf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/overlayfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c11faf3

Please sign in to comment.