]> git.baikalelectronics.ru Git - kernel.git/commit
dm thin: fix stacked bi_next usage
authorJoe Thornber <ejt@redhat.com>
Wed, 28 Mar 2012 17:41:23 +0000 (18:41 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Wed, 28 Mar 2012 17:41:23 +0000 (18:41 +0100)
commit2a7ded237189512a00926d4f80f8bf878f6d4231
tree7e4982a066935a2434780b5e34fb24fb15e533f0
parentf93628c83b402dbbaa4e7ececd2fb62ad70d58e5
dm thin: fix stacked bi_next usage

Avoid using the bi_next field for the holder of a cell when deferring
bios because a stacked device below might change it.  Store the
holder in a new field in struct cell instead.

When a cell is created, the bio that triggered creation (the holder) was
added to the same bio list as subsequent bios.  In some cases we pass
this holder bio directly to devices underneath.  If those devices use
the bi_next field there will be trouble...

This also simplifies some code that had to work out which bio was the
holder.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-thin.c