Commit cc4b0bcd authored by Andrew Morton's avatar Andrew Morton Committed by Christoph Hellwig

[PATCH] d_lookup forgotten spin_unlock()

From: Nikita Danilov, Maneesh Soni

d_lookup() is forgetting to release the lock when the rename race happens.
parent 6a53edc5
......@@ -995,13 +995,13 @@ struct dentry * d_lookup(struct dentry * parent, struct qstr * name)
/*
* If dentry is moved, fail the lookup
*/
if (unlikely(move_count != dentry->d_move_count))
break;
if (likely(move_count == dentry->d_move_count)) {
if (!d_unhashed(dentry)) {
atomic_inc(&dentry->d_count);
dentry->d_vfs_flags |= DCACHE_REFERENCED;
found = dentry;
}
}
spin_unlock(&dentry->d_lock);
break;
}
......
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