mirror of
https://github.com/versity/scoutfs.git
synced 2026-09-04 23:27:05 +00:00
We consistently enter scoutfs_data_wait_check when len == 0 from scoutfs_aio_write() which directly passes the i_size_read() value, and for cases where we `echo >> $FILE` this is always reached. This can cause the wrapping check to fail since `0 + (0 - 1) < 0` which triggers the WARN_ON_ONCE wrap check that needs updating to allow certain operations on huge files. More importantly we can just omit all these checks if `len == 0` anyway, since they should always succeed and never should require taking all the locks. Signed-off-by: Auke Kok <auke.kok@versity.com>