Skip to content

Commit

Permalink
Remove dead code in dget_parent()
Browse files Browse the repository at this point in the history
->d_parent is never NULL...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Jul 21, 2011
1 parent e4b9f00 commit 86c98e8
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,6 @@ struct dentry *dget_parent(struct dentry *dentry)
*/
rcu_read_lock();
ret = dentry->d_parent;
if (!ret) {
rcu_read_unlock();
goto out;
}
spin_lock(&ret->d_lock);
if (unlikely(ret != dentry->d_parent)) {
spin_unlock(&ret->d_lock);
Expand All @@ -563,7 +559,6 @@ struct dentry *dget_parent(struct dentry *dentry)
BUG_ON(!ret->d_count);
ret->d_count++;
spin_unlock(&ret->d_lock);
out:
return ret;
}
EXPORT_SYMBOL(dget_parent);
Expand Down

0 comments on commit 86c98e8

Please sign in to comment.