Commit 17eb677b authored by Ian Kent's avatar Ian Kent Committed by james toy

In autofs4_lookup_active() a declaration within the list traversal loop

uses a declaration that has the same name as the function parameter.
Signed-off-by: default avatarIan Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 9a3b5dd5
...@@ -419,23 +419,23 @@ static struct dentry *autofs4_lookup_active(struct dentry *dentry) ...@@ -419,23 +419,23 @@ static struct dentry *autofs4_lookup_active(struct dentry *dentry)
head = &sbi->active_list; head = &sbi->active_list;
list_for_each(p, head) { list_for_each(p, head) {
struct autofs_info *ino; struct autofs_info *ino;
struct dentry *dentry; struct dentry *active;
struct qstr *qstr; struct qstr *qstr;
ino = list_entry(p, struct autofs_info, active); ino = list_entry(p, struct autofs_info, active);
dentry = ino->dentry; active = ino->dentry;
spin_lock(&dentry->d_lock); spin_lock(&active->d_lock);
/* Already gone? */ /* Already gone? */
if (atomic_read(&dentry->d_count) == 0) if (atomic_read(&active->d_count) == 0)
goto next; goto next;
qstr = &dentry->d_name; qstr = &active->d_name;
if (dentry->d_name.hash != hash) if (active->d_name.hash != hash)
goto next; goto next;
if (dentry->d_parent != parent) if (active->d_parent != parent)
goto next; goto next;
if (qstr->len != len) if (qstr->len != len)
...@@ -443,15 +443,15 @@ static struct dentry *autofs4_lookup_active(struct dentry *dentry) ...@@ -443,15 +443,15 @@ static struct dentry *autofs4_lookup_active(struct dentry *dentry)
if (memcmp(qstr->name, str, len)) if (memcmp(qstr->name, str, len))
goto next; goto next;
if (d_unhashed(dentry)) { if (d_unhashed(active)) {
dget(dentry); dget(active);
spin_unlock(&dentry->d_lock); spin_unlock(&active->d_lock);
spin_unlock(&sbi->lookup_lock); spin_unlock(&sbi->lookup_lock);
spin_unlock(&dcache_lock); spin_unlock(&dcache_lock);
return dentry; return active;
} }
next: next:
spin_unlock(&dentry->d_lock); spin_unlock(&active->d_lock);
} }
spin_unlock(&sbi->lookup_lock); spin_unlock(&sbi->lookup_lock);
spin_unlock(&dcache_lock); spin_unlock(&dcache_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment