ovl: update ctx->pos on impure dir iteration
authorAmir Goldstein <amir73il@gmail.com>
Wed, 29 Nov 2017 05:35:21 +0000 (07:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:10:18 +0000 (10:10 +0100)
commitcb6ee0f3c19980328529d5ed7a1650e41164ca49
tree0d31936f2d743a1aebebd74209b2475e804a23eb
parent066f40dc495d5ab2ec9a871cb8703d9591d636c5
ovl: update ctx->pos on impure dir iteration

commit b02a16e6413a2f782e542ef60bad9ff6bf212f8a upstream.

This fixes a regression with readdir of impure dir in overlayfs
that is shared to VM via 9p fs.

Reported-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Fixes: 4edb83bb1041 ("ovl: constant d_ino for non-merge dirs")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Tested-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/overlayfs/readdir.c