]> www.infradead.org Git - users/sagi/libnvme.git/commit
tree: Fix argument check in nvme_bytes_to_lba
authorDaniel Wagner <dwagner@suse.de>
Wed, 5 Apr 2023 06:37:38 +0000 (08:37 +0200)
committerDaniel Wagner <wagi@monom.org>
Wed, 5 Apr 2023 07:21:44 +0000 (09:21 +0200)
commit01c6055e5602ba22d37c930f504f07ffaaf1df54
treee933a349331d4ba3424eb1d4804a57cd9a818367
parenta8a5d300c70fc30ffd793bb5726a4ec3d0719163
tree: Fix argument check in nvme_bytes_to_lba

nvme_bytes_to_lba() argument checker is ensuring that all passed in
values are valid. That means we have at least one block to write, the
offset is aligned to a block starting address and the number of blocks
is a multiple of the block size

The last check is wrong, thus fix it.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
src/nvme/tree.c