[sheepdog] [Qemu-devel] [PATCH] sheepdog: fix confused return values

Liu Yuan namei.unix at gmail.com
Thu Feb 26 04:54:46 CET 2015


On Wed, Feb 25, 2015 at 10:35:17AM +0100, Markus Armbruster wrote:
> Liu Yuan <namei.unix at gmail.com> writes:
> 
> > On Wed, Feb 18, 2015 at 09:35:07AM +0100, Markus Armbruster wrote:
> >> Liu Yuan <namei.unix at gmail.com> writes:
> >> 
> >> > From: Liu Yuan <liuyuan at cmss.chinamobile.com>
> >> >
> >> > These functions mix up -1 and -errno in return values and would might cause
> >> > trouble error handling in the call chain.
> >> >
> >> > This patch let them return -errno and add some comments.
> >> >
> >> > Reported-by: Markus Armbruster <armbru at redhat.com>
> >> > Signed-off-by: Liu Yuan <liuyuan at cmss.chinamobile.com>
> >> 
> >> Did you review all functions returning negative errno, or just the two
> >> that caught my eye?
> >
> > Umm, mostly the two you mentioned.
> 
> I encourage you to review the whole file for this error pattern!  In my
> experience, bugs occur in clusters.  When you find one, there's a high
> chance similar ones exist, and looking for them is good practice.

Hi Markus, I've checked the whole file as possible as I can. I can't find more
ret mixing bugs.

Yuan



More information about the sheepdog mailing list