diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-11-13 07:45:40 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-29 11:27:51 -0800 |
commit | 9e5129ba8d3d65605683050f73f12dddbf3f8c00 (patch) | |
tree | f7ed8298a48ea9eeef20204f207a51284a6e400b /fs/dcache.c | |
parent | 6beb1be0ea111cea50d410cdafabaa2065295e45 (diff) | |
download | lwn-9e5129ba8d3d65605683050f73f12dddbf3f8c00.tar.gz lwn-9e5129ba8d3d65605683050f73f12dddbf3f8c00.zip |
prepend_path() needs to reinitialize dentry/vfsmount/mnt on restarts
commit ede4cebce16f5643c61aedd6d88d9070a1d23a68 upstream.
... and equivalent is needed in 3.12; it's broken there as well
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Reported-by: Michael Marineau <michael.marineau@coreos.com>
Tested-by: Waiman Long <Waiman.Long@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r-- | fs/dcache.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index ae6ebb88ceff..89f96719a29b 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -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; |