/* Check the file size bounds and adjusts count as needed. This would not be needed if the file size didn't reset to 0 after a write.  */
static size_t w1_f23_fix_count(loff_t off, size_t count, size_t size)
/* Check the file size bounds and adjusts count as needed. This would not be needed if the file size didn't reset to 0 after a write.  */
static size_t w1_f23_fix_count(loff_t off, size_t count, size_t size)
{
	if (off > size)
		return 0;
	if ((off + count) > size)
		return (size - off);
	return count;
}