aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2014-02-13 12:46:25 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2014-10-09 02:38:57 -0400
commit5542aa2fa7f6cddb03c4ac3135e390adffda98ca (patch)
treeadfb3c0923c8f00e7946e85c1d8742dc89f0cce7 /fs/dcache.c
parent1ffe46d11cc88479797b262f60d92e5fb461b411 (diff)
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)
1346 * d_invalidate - detach submounts, prune dcache, and drop 1346 * d_invalidate - detach submounts, prune dcache, and drop
1347 * @dentry: dentry to invalidate (aka detach, prune and drop) 1347 * @dentry: dentry to invalidate (aka detach, prune and drop)
1348 * 1348 *
1349 * Try to invalidate the dentry if it turns out to be
1350 * possible. If there are reasons not to delete it
1351 * return -EBUSY. On success return 0.
1352 *
1353 * no dcache lock. 1349 * no dcache lock.
1354 * 1350 *
1355 * The final d_drop is done as an atomic operation relative to 1351 * The final d_drop is done as an atomic operation relative to
1356 * rename_lock ensuring there are no races with d_set_mounted. This 1352 * rename_lock ensuring there are no races with d_set_mounted. This
1357 * ensures there are no unhashed dentries on the path to a mountpoint. 1353 * ensures there are no unhashed dentries on the path to a mountpoint.
1358 */ 1354 */
1359int d_invalidate(struct dentry *dentry) 1355void d_invalidate(struct dentry *dentry)
1360{ 1356{
1361 int ret = 0;
1362
1363 /* 1357 /*
1364 * If it's already been dropped, return OK. 1358 * If it's already been dropped, return OK.
1365 */ 1359 */
1366 spin_lock(&dentry->d_lock); 1360 spin_lock(&dentry->d_lock);
1367 if (d_unhashed(dentry)) { 1361 if (d_unhashed(dentry)) {
1368 spin_unlock(&dentry->d_lock); 1362 spin_unlock(&dentry->d_lock);
1369 return 0; 1363 return;
1370 } 1364 }
1371 spin_unlock(&dentry->d_lock); 1365 spin_unlock(&dentry->d_lock);
1372 1366
1373 /* Negative dentries can be dropped without further checks */ 1367 /* Negative dentries can be dropped without further checks */
1374 if (!dentry->d_inode) { 1368 if (!dentry->d_inode) {
1375 d_drop(dentry); 1369 d_drop(dentry);
1376 goto out; 1370 return;
1377 } 1371 }
1378 1372
1379 for (;;) { 1373 for (;;) {
@@ -1399,9 +1393,6 @@ int d_invalidate(struct dentry *dentry)
1399 1393
1400 cond_resched(); 1394 cond_resched();
1401 } 1395 }
1402
1403out:
1404 return ret;
1405} 1396}
1406EXPORT_SYMBOL(d_invalidate); 1397EXPORT_SYMBOL(d_invalidate);
1407 1398