Re: [PATCH 14/14] btrfs-progs: Error handling in scrub_progress_cycle() thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -	ret = pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &old);
> +	ret = -pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &old);
>  	if (ret)
> -		return ERR_PTR(-ret);
> +		goto out;

Am I the only one who finds ret = -pthread_*() pretty odd? :)  (ret = -0
on success.. ok.. I guess..)

I'd have done something like

	err = pthread_*()
	if (err) {
		ret = -err;

so that it looks like the -1/errno pattern that our brains already have
to deal with.

- z
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux