Commit b02a16e6 authored by Amir Goldstein's avatar Amir Goldstein Committed by Miklos Szeredi

ovl: update ctx->pos on impure dir iteration

This fixes a regression with readdir of impure dir in overlayfs
that is shared to VM via 9p fs.
Reported-by: default avatarMiguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Fixes: 4edb83bb ("ovl: constant d_ino for non-merge dirs")
Cc: <stable@vger.kernel.org> #4.14
Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
Tested-by: default avatarMiguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent 08d8f8a5
......@@ -663,7 +663,10 @@ static int ovl_iterate_real(struct file *file, struct dir_context *ctx)
return PTR_ERR(rdt.cache);
}
return iterate_dir(od->realfile, &rdt.ctx);
err = iterate_dir(od->realfile, &rdt.ctx);
ctx->pos = rdt.ctx.pos;
return err;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment