[Devel] [PATCH RHEL7 COMMIT] ms/fs: prepend_path() needs to reinitialize dentry/vfsmount/mnt on restarts
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Jun 18 05:59:44 PDT 2015
The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.14
------>
commit 4e9955e2ab67bfb8130919312e0d1689d42e6a2c
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date: Thu Jun 18 16:59:39 2015 +0400
ms/fs: prepend_path() needs to reinitialize dentry/vfsmount/mnt on restarts
Patchset description:
port fixes from mainstream to fix fails from getcwd04 test,
now it pass:
./third/ltp/testcases/kernel/syscalls/getcwd/getcwd04
getcwd04 1 TPASS : Bug is not reproduced!
https://jira.sw.ru/browse/PSBM-34245
Al Viro (2):
prepend_path() needs to reinitialize dentry/vfsmount/mnt on restarts
__dentry_path() fixes
Eric W. Biederman (1):
vfs: Remove second variable named error in __dentry_path
Pavel Tikhomirov (1):
dcache: reinitialize error for resetart in prepend_path as in ms
##################################################################
This patch description:
From: Al Viro <viro at zeniv.linux.org.uk>
Port mainstream commit:
commit ede4cebce16f5643c61aedd6d88d9070a1d23a68
Author: Al Viro <viro at zeniv.linux.org.uk>
Date: Wed Nov 13 07:45:40 2013 -0500
prepend_path() needs to reinitialize dentry/vfsmount/mnt on
... and equivalent is needed in 3.12; it's broken there as
Signed-off-by: Al Viro <viro at zeniv.linux.org.uk>
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Reviewed-by: Vladimir Davydov <vdavydov at parallels.com>
---
fs/dcache.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/fs/dcache.c b/fs/dcache.c
index 3670260..27c3a3a 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2875,9 +2875,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;
@@ -2887,6 +2887,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;
More information about the Devel
mailing list