libceph: use for_each_request() in ceph_osdc_abort_on_full()
authorIlya Dryomov <idryomov@gmail.com>
Wed, 16 May 2018 16:21:34 +0000 (18:21 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 4 Jun 2018 18:45:58 +0000 (20:45 +0200)
commit4eea0fefd7e60552b36a74f49bd7064d1a5aef2d
treed34521294c75700eebf59b061a7500aa5acee060
parent88bc1922c273c95e84a8955e657401f9bc63a80b
libceph: use for_each_request() in ceph_osdc_abort_on_full()

Scanning the trees just to see if there is anything to abort is
unnecessary -- all that is needed here is to update the epoch barrier
first, before we start aborting.  Simplify and do the update inside the
loop before calling abort_request() for the first time.

The switch to for_each_request() also fixes a bug: homeless requests
weren't even considered for aborting.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
net/ceph/osd_client.c