scoutfs: remove scoutfs_item_delete_many()

It looked like it was easier to have a helper dirty and delete items.
But now that we also have to pass in locks the interface gets messy
enough that it's easier to have the caller take care of it.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2017-07-31 14:04:26 -07:00
parent f634a5b598
commit d2ea247ab9
2 changed files with 0 additions and 33 deletions

View File

@@ -1416,36 +1416,6 @@ void scoutfs_item_delete_dirty(struct super_block *sb,
scoutfs_kvec_kfree(del_val);
}
/*
* A helper that deletes a set of items. It first dirties the items
* will be pinned so that deletion won't fail as it tries to read and
* populate the items.
*
* It's a little cleaner to have this helper than have the caller
* iterate, but it could also give us the opportunity to reduce item
* searches if we remembered the items we dirtied.
*/
int scoutfs_item_delete_many(struct super_block *sb,
struct scoutfs_key_buf **keys, unsigned nr,
struct scoutfs_key_buf **ends)
{
int ret = 0;
int i;
for (i = 0; i < nr; i++) {
ret = scoutfs_item_dirty(sb, keys[i], ends[i]);
if (ret)
goto out;
}
for (i = 0; i < nr; i++)
scoutfs_item_delete_dirty(sb, keys[i]);
out:
trace_printk("ret %d\n", ret);
return ret;
}
/*
* Return the first dirty node in the subtree starting at the given node.
*/

View File

@@ -36,9 +36,6 @@ int scoutfs_item_update(struct super_block *sb, struct scoutfs_key_buf *key,
struct kvec *val, struct scoutfs_key_buf *end);
void scoutfs_item_delete_dirty(struct super_block *sb,
struct scoutfs_key_buf *key);
int scoutfs_item_delete_many(struct super_block *sb,
struct scoutfs_key_buf **keys, unsigned nr,
struct scoutfs_key_buf **ends);
int scoutfs_item_delete(struct super_block *sb, struct scoutfs_key_buf *key,
struct scoutfs_key_buf *end);