Re: [PATCH v3 2/2] vhost: return bool from *_access_ok() functions

2018-04-11 Thread Michael S. Tsirkin
On Wed, Apr 11, 2018 at 10:35:41AM +0800, Stefan Hajnoczi wrote: > Currently vhost *_access_ok() functions return int. This is error-prone > because there are two popular conventions: > > 1. 0 means failure, 1 means success > 2. -errno means failure, 0 means success > > Although vhost mostly use

[PATCH v3 2/2] vhost: return bool from *_access_ok() functions

2018-04-10 Thread Stefan Hajnoczi
Currently vhost *_access_ok() functions return int. This is error-prone because there are two popular conventions: 1. 0 means failure, 1 means success 2. -errno means failure, 0 means success Although vhost mostly uses #1, it does not do so consistently. umem_access_ok() uses #2. This patch cha