ceph: fix off by one bugs in unsafe_request_wait()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 6 Sep 2021 09:43:01 +0000 (12:43 +0300)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 21 Sep 2021 15:39:20 +0000 (17:39 +0200)
commit708c87168b6121abc74b2a57d0c498baaf70cbea
treefa6bd45488db5bf659c8e6708d57743a6d120954
parente4e737bb5c170df6135a127739a9e6148ee3da82
ceph: fix off by one bugs in unsafe_request_wait()

The "> max" tests should be ">= max" to prevent an out of bounds access
on the next lines.

Fixes: e1a4541ec0b9 ("ceph: flush the mdlog before waiting on unsafe reqs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c