[Devel] [PATCH RH7 2/4] vfs: reinitialize error for resetart in prepend_path as in ms

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Wed Jun 17 07:05:11 PDT 2015


It seem safer to reinitialize error as introduced in ms 48a066e72d

Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.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);
-- 
1.9.3




More information about the Devel mailing list