scoutfs: add SIC_EXACT

Add an item count call that lets the caller give the exact item count
instead of basing it on the operation they're performing.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2018-04-02 09:15:19 -07:00
committed by Zach Brown
parent 002daf3c1c
commit 0c7ea66f57

View File

@@ -22,6 +22,18 @@ struct scoutfs_item_count {
signed vals;
};
/* The caller knows exactly what they're doing. */
static inline const struct scoutfs_item_count SIC_EXACT(signed items,
signed vals)
{
struct scoutfs_item_count cnt = {
.items = items,
.vals = vals,
};
return cnt;
}
/*
* Allocating an inode creates a new set of indexed items.
*/