Re: [PATCH v2 1/5] nbd: simplify find_fallback() by removing redundant logic
- To: "Yang Erkun" <yangerkun@huawei.com>, <josef@toxicpanda.com>, <axboe@kernel.dk>, <hch@lst.de>, <yukuai@fygo.io>
- Cc: <yi.zhang@huawei.com>, <chengzhihao1@huawei.com>, <echo.chenlin@huawei.com>, <leo.lilong@huaweicloud.com>, <wangkefeng.wang@huawei.com>, <linux-block@vger.kernel.org>, <nbd@other.debian.org>
- Subject: Re: [PATCH v2 1/5] nbd: simplify find_fallback() by removing redundant logic
- From: "yu kuai" <yukuai@fygo.io>
- Date: Sun, 5 Jul 2026 17:32:27 +0800
- Message-id: <[🔎] 40aef437-bfd6-4484-ba4b-04adf192be86@fygo.io>
- Reply-to: yukuai@fygo.io
- In-reply-to: <20260625084458.4171890-2-yangerkun@huawei.com>
- References: <20260625084458.4171890-1-yangerkun@huawei.com> <20260625084458.4171890-2-yangerkun@huawei.com>
在 2026/6/25 16:44, Yang Erkun 写道:
> The second conditional checking nsock->fallback_index validity is the
> logical inverse of the first, so drop it and let execution fall through
> naturally. Consolidate the two identical dev_err_ratelimited() + return
> paths into a single no_fallback label to reduce duplication.
>
> Signed-off-by: Long Li<leo.lilong@huawei.com>
> ---
> drivers/block/nbd.c | 37 ++++++++++++++-----------------------
> 1 file changed, 14 insertions(+), 23 deletions(-)
Reviewed-by: Yu Kuai <yukuai@fygo.io>
--
Thanks,
Kuai
Reply to: