From: Shlomo Pongratz Date: Thu, 6 Feb 2014 16:33:17 +0000 (+0200) Subject: block/null_blk: Fix completion processing from LIFO to FIFO X-Git-Tag: v3.14-rc3~22^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7790b928d42597b7da21a4e43080774903e3b5c;p=pandora-kernel.git block/null_blk: Fix completion processing from LIFO to FIFO The completion queue is implemented using lockless list. The llist_add is adds the events to the list head which is a push operation. The processing of the completion elements is done by disconnecting all the pushed elements and iterating over the disconnected list. The problem is that the processing is done in reverse order w.r.t order of the insertion i.e. LIFO processing. By reversing the disconnected list which is done in linear time the desired FIFO processing is achieved. Signed-off-by: Shlomo Pongratz Signed-off-by: Jens Axboe --- Reading git-diff-tree failed