|
@@ -695,9 +695,6 @@ static struct mountpoint *lookup_mountpoint(struct dentry *dentry)
|
|
|
|
|
|
hlist_for_each_entry(mp, chain, m_hash) {
|
|
|
if (mp->m_dentry == dentry) {
|
|
|
- /* might be worth a WARN_ON() */
|
|
|
- if (d_unlinked(dentry))
|
|
|
- return ERR_PTR(-ENOENT);
|
|
|
mp->m_count++;
|
|
|
return mp;
|
|
|
}
|
|
@@ -711,6 +708,9 @@ static struct mountpoint *get_mountpoint(struct dentry *dentry)
|
|
|
int ret;
|
|
|
|
|
|
if (d_mountpoint(dentry)) {
|
|
|
+ /* might be worth a WARN_ON() */
|
|
|
+ if (d_unlinked(dentry))
|
|
|
+ return ERR_PTR(-ENOENT);
|
|
|
mountpoint:
|
|
|
read_seqlock_excl(&mount_lock);
|
|
|
mp = lookup_mountpoint(dentry);
|