Skip to content

Commit

Permalink
autofs4: rename dentry to expiring in autofs4_lookup_expiring()
Browse files Browse the repository at this point in the history
In autofs4_lookup_expiring() a declaration within the list traversal loop
uses a declaration that has the same name as the function parameter.

Signed-off-by: Ian 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Ian Kent authored and Linus Torvalds committed Dec 16, 2009
1 parent e4d5ade commit cb4b492
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions fs/autofs4/root.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,39 +474,39 @@ static struct dentry *autofs4_lookup_expiring(struct dentry *dentry)
head = &sbi->expiring_list;
list_for_each(p, head) {
struct autofs_info *ino;
struct dentry *dentry;
struct dentry *expiring;
struct qstr *qstr;

ino = list_entry(p, struct autofs_info, expiring);
dentry = ino->dentry;
expiring = ino->dentry;

spin_lock(&dentry->d_lock);
spin_lock(&expiring->d_lock);

/* Bad luck, we've already been dentry_iput */
if (!dentry->d_inode)
if (!expiring->d_inode)
goto next;

qstr = &dentry->d_name;
qstr = &expiring->d_name;

if (dentry->d_name.hash != hash)
if (expiring->d_name.hash != hash)
goto next;
if (dentry->d_parent != parent)
if (expiring->d_parent != parent)
goto next;

if (qstr->len != len)
goto next;
if (memcmp(qstr->name, str, len))
goto next;

if (d_unhashed(dentry)) {
dget(dentry);
spin_unlock(&dentry->d_lock);
if (d_unhashed(expiring)) {
dget(expiring);
spin_unlock(&expiring->d_lock);
spin_unlock(&sbi->lookup_lock);
spin_unlock(&dcache_lock);
return dentry;
return expiring;
}
next:
spin_unlock(&dentry->d_lock);
spin_unlock(&expiring->d_lock);
}
spin_unlock(&sbi->lookup_lock);
spin_unlock(&dcache_lock);
Expand Down

0 comments on commit cb4b492

Please sign in to comment.