]> git.baikalelectronics.ru Git - kernel.git/commit
rbd: bio_chain_clone() cleanups
authorAlex Elder <elder@inktank.com>
Thu, 9 Aug 2012 17:33:25 +0000 (10:33 -0700)
committerAlex Elder <elder@inktank.com>
Mon, 1 Oct 2012 19:30:50 +0000 (14:30 -0500)
commita974b352f7f680fd0e5ab7f92f6721b907f2fe5b
treeaa172df458c049a10082f1c595bf26d00dcd40a8
parent2021b48a9f1eefa38b5bb094a94e7e41fa9ce764
rbd: bio_chain_clone() cleanups

In bio_chain_clone(), at the end of the function the bi_next field
of the tail of the new bio chain is nulled.  This isn't necessary,
because if "tail" is non-null, its value will be the last bio
structure allocated at the top of the while loop in that function.
And before that structure is added to the end of the new chain, its
bi_next pointer is always made null.

While touching that function, clean a few other things:
    - define each local variable on its own line
    - move the definition of "tmp" to an inner scope
    - move the modification of gfpmask closer to where it's used
    - rearrange the logic that sets the chain's tail pointer

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
drivers/block/rbd.c