From: Gu Zheng Date: Tue, 1 Jul 2014 16:36:47 +0000 (-0600) Subject: bio-integrity: add "bip_max_vcnt" into struct bio_integrity_payload X-Git-Tag: omap-for-v3.17/fixes-against-rc2~75^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbcd1054a1fd2aa980fc11ff28e436fc4aaa2d54;p=pandora-kernel.git bio-integrity: add "bip_max_vcnt" into struct bio_integrity_payload Commit 08778795 ("block: Fix nr_vecs for inline integrity vectors") from Martin introduces the function bip_integrity_vecs(get the useful vectors) to fix the issue about nr_vecs for inline integrity vectors that reported by David Milburn. But it seems that bip_integrity_vecs() will return the wrong number if the bio is not based on any bio_set for some reason(bio->bi_pool == NULL), because in that case, the bip_inline_vecs[0] is malloced directly. So here we add the bip_max_vcnt to record the count of vector slots, and cleanup the function bip_integrity_vecs(). Signed-off-by: Gu Zheng Cc: Martin K. Petersen Cc: Kent Overstreet Signed-off-by: Jens Axboe --- Reading git-diff-tree failed