Skip to content

Commit

Permalink
prepend_path() needs to reinitialize dentry/vfsmount/mnt on restarts
Browse files Browse the repository at this point in the history
... and equivalent is needed in 3.12; it's broken there as well

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Nov 13, 2013
1 parent 4ec6c2a commit ede4ceb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -2912,9 +2912,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, m_seq = 0;
char *bptr;
Expand All @@ -2929,6 +2929,9 @@ static int prepend_path(const struct path *path,
bptr = *buffer;
blen = *buflen;
error = 0;
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;
Expand Down

0 comments on commit ede4ceb

Please sign in to comment.