summaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2014-02-13 09:46:25 -0800
committerAl Viro <viro@zeniv.linux.org.uk>2014-10-09 02:38:57 -0400
commit5542aa2fa7f6cddb03c4ac3135e390adffda98ca (patch)
treeadfb3c0923c8f00e7946e85c1d8742dc89f0cce7 /fs/dcache.c
parent1ffe46d11cc88479797b262f60d92e5fb461b411 (diff)
downloadlinux-5542aa2fa7f6cddb03c4ac3135e390adffda98ca.tar.gz
linux-5542aa2fa7f6cddb03c4ac3135e390adffda98ca.tar.bz2
linux-5542aa2fa7f6cddb03c4ac3135e390adffda98ca.zip
vfs: Make d_invalidate return void
Now that d_invalidate can no longer fail, stop returning a useless return code. For the few callers that checked the return code update remove the handling of d_invalidate failure. Reviewed-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 5e02b9eee6b1..70d102e70271 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -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);