afs: Fix afs_write_end() to handle short writes