|
@@ -1346,34 +1346,28 @@ static void check_and_drop(void *_data)
|
|
|
* d_invalidate - detach submounts, prune dcache, and drop
|
|
|
* @dentry: dentry to invalidate (aka detach, prune and drop)
|
|
|
*
|
|
|
- * Try to invalidate the dentry if it turns out to be
|
|
|
- * possible. If there are reasons not to delete it
|
|
|
- * return -EBUSY. On success return 0.
|
|
|
- *
|
|
|
* no dcache lock.
|
|
|
*
|
|
|
* The final d_drop is done as an atomic operation relative to
|
|
|
* rename_lock ensuring there are no races with d_set_mounted. This
|
|
|
* ensures there are no unhashed dentries on the path to a mountpoint.
|
|
|
*/
|
|
|
-int d_invalidate(struct dentry *dentry)
|
|
|
+void d_invalidate(struct dentry *dentry)
|
|
|
{
|
|
|
- int ret = 0;
|
|
|
-
|
|
|
/*
|
|
|
* If it's already been dropped, return OK.
|
|
|
*/
|
|
|
spin_lock(&dentry->d_lock);
|
|
|
if (d_unhashed(dentry)) {
|
|
|
spin_unlock(&dentry->d_lock);
|
|
|
- return 0;
|
|
|
+ return;
|
|
|
}
|
|
|
spin_unlock(&dentry->d_lock);
|
|
|
|
|
|
/* Negative dentries can be dropped without further checks */
|
|
|
if (!dentry->d_inode) {
|
|
|
d_drop(dentry);
|
|
|
- goto out;
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
for (;;) {
|
|
@@ -1399,9 +1393,6 @@ int d_invalidate(struct dentry *dentry)
|
|
|
|
|
|
cond_resched();
|
|
|
}
|
|
|
-
|
|
|
-out:
|
|
|
- return ret;
|
|
|
}
|
|
|
EXPORT_SYMBOL(d_invalidate);
|
|
|
|