Skip to content

Commit b02a16e

Browse files
amir73ilMiklos Szeredi
authored andcommitted
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: Miguel Bernal Marin <[email protected]> Fixes: 4edb83b ("ovl: constant d_ino for non-merge dirs") Cc: <[email protected]> #4.14 Signed-off-by: Amir Goldstein <[email protected]> Tested-by: Miguel Bernal Marin <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]>
1 parent 08d8f8a commit b02a16e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fs/overlayfs/readdir.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,10 @@ static int ovl_iterate_real(struct file *file, struct dir_context *ctx)
663663
return PTR_ERR(rdt.cache);
664664
}
665665

666-
return iterate_dir(od->realfile, &rdt.ctx);
666+
err = iterate_dir(od->realfile, &rdt.ctx);
667+
ctx->pos = rdt.ctx.pos;
668+
669+
return err;
667670
}
668671

669672

0 commit comments

Comments
 (0)