Skip to contentSkip to conversation

vfs: Remove second variable named error in __dentry_path

PATCH New Eric W. Biederman 1 participant 1 message Jan 20, 2014 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vfs: Remove second variable named error in __dentry_path

In commit 232d2d60aa5469bb097f55728f65146bd49c1d25

Author: Waiman Long <[email protected]>
Date:   Mon Sep 9 12:18:13 2013 -0400

dcache: Translating dentry into pathname without taking rename_lock

The __dentry_path locking was changed and the variable error was intended to be moved outside of the loop. Unfortunately the inner declaration of error was not removed. Resulting in a version of __dentry_path that will never return an error.

Remove the problematic inner declaration of error and allow __dentry_path to return errors once again.

---
 fs/dcache.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
fs/dcache.c +0 -1
index cb4a10690868..fdbe23027810 100644
@@ -3135,7 +3135,6 @@ restart:
 	read_seqbegin_or_lock(&rename_lock, &seq);
 	while (!IS_ROOT(dentry)) {
 		struct dentry *parent = dentry->d_parent;
-		int error;
 
 		prefetch(parent);
 		error = prepend_name(&end, &len, &dentry->d_name);
Signature · 1 line
1.7.5.4