diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-11-13 07:45:40 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-11-13 07:45:40 -0500 |
commit | ede4cebce16f5643c61aedd6d88d9070a1d23a68 (patch) | |
tree | e5badf413ffaa9326f46597d065a88ba5f6c2cf7 | |
parent | 4ec6c2aeab8a909418ac60b782a963cb7257207f (diff) |
prepend_path() needs to reinitialize dentry/vfsmount/mnt on restarts
... and equivalent is needed in 3.12; it's broken there as well
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-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 eacc853a2e3a..a9dd384c5e80 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
@@ -2912,9 +2912,9 @@ static int prepend_path(const struct path *path, | |||
2912 | const struct path *root, | 2912 | const struct path *root, |
2913 | char **buffer, int *buflen) | 2913 | char **buffer, int *buflen) |
2914 | { | 2914 | { |
2915 | struct dentry *dentry = path->dentry; | 2915 | struct dentry *dentry; |
2916 | struct vfsmount *vfsmnt = path->mnt; | 2916 | struct vfsmount *vfsmnt; |
2917 | struct mount *mnt = real_mount(vfsmnt); | 2917 | struct mount *mnt; |
2918 | int error = 0; | 2918 | int error = 0; |
2919 | unsigned seq, m_seq = 0; | 2919 | unsigned seq, m_seq = 0; |
2920 | char *bptr; | 2920 | char *bptr; |
@@ -2929,6 +2929,9 @@ restart: | |||
2929 | bptr = *buffer; | 2929 | bptr = *buffer; |
2930 | blen = *buflen; | 2930 | blen = *buflen; |
2931 | error = 0; | 2931 | error = 0; |
2932 | dentry = path->dentry; | ||
2933 | vfsmnt = path->mnt; | ||
2934 | mnt = real_mount(vfsmnt); | ||
2932 | read_seqbegin_or_lock(&rename_lock, &seq); | 2935 | read_seqbegin_or_lock(&rename_lock, &seq); |
2933 | while (dentry != root->dentry || vfsmnt != root->mnt) { | 2936 | while (dentry != root->dentry || vfsmnt != root->mnt) { |
2934 | struct dentry * parent; | 2937 | struct dentry * parent; |