On Mon, Sep 06, 2021 at 09:47:54PM +0900, Tetsuo Handa wrote:
quoted hunk ↗ jump to hunk
+ mutex_lock(&brd_devices_mutex);
+ list_for_each_entry(brd, &brd_devices, brd_list) {
+ if (brd->brd_number != i)
+ continue;
+ mutex_unlock(&brd_devices_mutex);
+ return -EEXIST;
Nit: I'd do this as:
if (brd->brd_number == i) {
mutex_unlock(&brd_devices_mutex);
return -EEXIST;
}
to flow a little nicer.
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>