[PATCH] misc: mark write buffer const