Re: [PATCH] ceph: return result directly from wait_for_completion_killable()

From: Ilya Dryomov
Date: Sun Oct 27 2024 - 15:47:56 EST


On Mon, Oct 14, 2024 at 1:40 PM Qianqiang Liu <qianqiang.liu@xxxxxxx> wrote:
>
> Simplify the code by returning the result of
> wait_for_completion_killable() directly, instead of calling it
> separately and then returning 0.
>
> No functional changes are introduced, this is a simple refactor

Hi Qianqiang,

I don't think this statement is true. If the wait is interrupted,
wait_for_completion_killable() returns -ERESTARTSYS and currently
ceph_lock_wait_for_completion() swallows it, similar to how -ERESTARTSYS
coming from ceph_mdsc_do_request() is ignored a few lines above.

Thanks,

Ilya