[Devel] [PATCH RHEL7 COMMIT] ms/vfs: reinitialize error for resetart in prepend_path as in ms

Konstantin Khorenko khorenko at virtuozzo.com
Thu Jun 18 05:59:58 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 2b5c2f9ae27dfd3a3b15d995552d5c4fab529919
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date:   Thu Jun 18 16:59:58 2015 +0400

    ms/vfs: reinitialize error for resetart in prepend_path as in ms
    
    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:
    
    It seem safer to reinitialize error as introduced in ms 48a066e72d
    
    Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
    Reviewed-by: Vladimir Davydov <vdavydov at parallels.com>
---
 fs/dcache.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index 27c3a3a..ecbfb07 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2878,7 +2878,7 @@ static int prepend_path(const struct path *path,
 	struct dentry *dentry;
 	struct vfsmount *vfsmnt;
 	struct mount *mnt;
-	int error = 0;
+	int error;
 	unsigned seq = 0;
 	char *bptr;
 	int blen;
@@ -2887,6 +2887,7 @@ static int prepend_path(const struct path *path,
 restart:
 	bptr = *buffer;
 	blen = *buflen;
+	error = 0;
 	dentry = path->dentry;
 	vfsmnt = path->mnt;
 	mnt = real_mount(vfsmnt);



More information about the Devel mailing list