Commit 9e5129ba authored by Al Viro's avatar Al Viro Committed by Greg Kroah-Hartman

prepend_path() needs to reinitialize dentry/vfsmount/mnt on restarts

commit ede4cebc upstream.

... and equivalent is needed in 3.12; it's broken there as well
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Reported-by: default avatarMichael Marineau <michael.marineau@coreos.com>
Tested-by: default avatarWaiman Long <Waiman.Long@hp.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6beb1be0
......@@ -2881,9 +2881,9 @@ static int prepend_path(const struct path *path,
const struct path *root,
char **buffer, int *buflen)
{
struct dentry *dentry = path->dentry;
struct vfsmount *vfsmnt = path->mnt;
struct mount *mnt = real_mount(vfsmnt);
struct dentry *dentry;
struct vfsmount *vfsmnt;
struct mount *mnt;
int error = 0;
unsigned seq = 0;
char *bptr;
......@@ -2893,6 +2893,9 @@ static int prepend_path(const struct path *path,
restart:
bptr = *buffer;
blen = *buflen;
dentry = path->dentry;
vfsmnt = path->mnt;
mnt = real_mount(vfsmnt);
read_seqbegin_or_lock(&rename_lock, &seq);
while (dentry != root->dentry || vfsmnt != root->mnt) {
struct dentry * parent;
......
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