diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-04-15 18:27:23 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-04-15 23:36:57 -0400 |
commit | 3a8e3611e0babd460bae2fa57674b9a208422217 (patch) | |
tree | 585907ced9cdee908c0f4d5515123f684006d27d /fs/dcache.c | |
parent | ff17fa561a04b5fdb25997fda98a2313bb471be6 (diff) |
d_walk(): kill 'finish' callback
no users left
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r-- | fs/dcache.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index 449d0f895e6f..af645c20db40 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
@@ -1230,13 +1230,11 @@ enum d_walk_ret { | |||
1230 | * @parent: start of walk | 1230 | * @parent: start of walk |
1231 | * @data: data passed to @enter() and @finish() | 1231 | * @data: data passed to @enter() and @finish() |
1232 | * @enter: callback when first entering the dentry | 1232 | * @enter: callback when first entering the dentry |
1233 | * @finish: callback when successfully finished the walk | ||
1234 | * | 1233 | * |
1235 | * The @enter() and @finish() callbacks are called with d_lock held. | 1234 | * The @enter() callbacks are called with d_lock held. |
1236 | */ | 1235 | */ |
1237 | static void d_walk(struct dentry *parent, void *data, | 1236 | static void d_walk(struct dentry *parent, void *data, |
1238 | enum d_walk_ret (*enter)(void *, struct dentry *), | 1237 | enum d_walk_ret (*enter)(void *, struct dentry *)) |
1239 | void (*finish)(void *)) | ||
1240 | { | 1238 | { |
1241 | struct dentry *this_parent; | 1239 | struct dentry *this_parent; |
1242 | struct list_head *next; | 1240 | struct list_head *next; |
@@ -1325,8 +1323,6 @@ ascend: | |||
1325 | if (need_seqretry(&rename_lock, seq)) | 1323 | if (need_seqretry(&rename_lock, seq)) |
1326 | goto rename_retry; | 1324 | goto rename_retry; |
1327 | rcu_read_unlock(); | 1325 | rcu_read_unlock(); |
1328 | if (finish) | ||
1329 | finish(data); | ||
1330 | 1326 | ||
1331 | out_unlock: | 1327 | out_unlock: |
1332 | spin_unlock(&this_parent->d_lock); | 1328 | spin_unlock(&this_parent->d_lock); |
@@ -1375,7 +1371,7 @@ int path_has_submounts(const struct path *parent) | |||
1375 | struct check_mount data = { .mnt = parent->mnt, .mounted = 0 }; | 1371 | struct check_mount data = { .mnt = parent->mnt, .mounted = 0 }; |
1376 | 1372 | ||
1377 | read_seqlock_excl(&mount_lock); | 1373 | read_seqlock_excl(&mount_lock); |
1378 | d_walk(parent->dentry, &data, path_check_mount, NULL); | 1374 | d_walk(parent->dentry, &data, path_check_mount); |
1379 | read_sequnlock_excl(&mount_lock); | 1375 | read_sequnlock_excl(&mount_lock); |
1380 | 1376 | ||
1381 | return data.mounted; | 1377 | return data.mounted; |
@@ -1483,7 +1479,7 @@ void shrink_dcache_parent(struct dentry *parent) | |||
1483 | data.start = parent; | 1479 | data.start = parent; |
1484 | data.found = 0; | 1480 | data.found = 0; |
1485 | 1481 | ||
1486 | d_walk(parent, &data, select_collect, NULL); | 1482 | d_walk(parent, &data, select_collect); |
1487 | if (!data.found) | 1483 | if (!data.found) |
1488 | break; | 1484 | break; |
1489 | 1485 | ||
@@ -1518,7 +1514,7 @@ static enum d_walk_ret umount_check(void *_data, struct dentry *dentry) | |||
1518 | static void do_one_tree(struct dentry *dentry) | 1514 | static void do_one_tree(struct dentry *dentry) |
1519 | { | 1515 | { |
1520 | shrink_dcache_parent(dentry); | 1516 | shrink_dcache_parent(dentry); |
1521 | d_walk(dentry, dentry, umount_check, NULL); | 1517 | d_walk(dentry, dentry, umount_check); |
1522 | d_drop(dentry); | 1518 | d_drop(dentry); |
1523 | dput(dentry); | 1519 | dput(dentry); |
1524 | } | 1520 | } |
@@ -1575,7 +1571,7 @@ void d_invalidate(struct dentry *dentry) | |||
1575 | shrink_dcache_parent(dentry); | 1571 | shrink_dcache_parent(dentry); |
1576 | for (;;) { | 1572 | for (;;) { |
1577 | struct dentry *victim = NULL; | 1573 | struct dentry *victim = NULL; |
1578 | d_walk(dentry, &victim, find_submount, NULL); | 1574 | d_walk(dentry, &victim, find_submount); |
1579 | if (!victim) { | 1575 | if (!victim) { |
1580 | if (had_submounts) | 1576 | if (had_submounts) |
1581 | shrink_dcache_parent(dentry); | 1577 | shrink_dcache_parent(dentry); |
@@ -3082,7 +3078,7 @@ static enum d_walk_ret d_genocide_kill(void *data, struct dentry *dentry) | |||
3082 | 3078 | ||
3083 | void d_genocide(struct dentry *parent) | 3079 | void d_genocide(struct dentry *parent) |
3084 | { | 3080 | { |
3085 | d_walk(parent, parent, d_genocide_kill, NULL); | 3081 | d_walk(parent, parent, d_genocide_kill); |
3086 | } | 3082 | } |
3087 | 3083 | ||
3088 | EXPORT_SYMBOL(d_genocide); | 3084 | EXPORT_SYMBOL(d_genocide); |