]> git.ipfire.org Git - people/ms/linux.git/commit
block: don't assume last put of shared tags is for the host
authorChristoph Hellwig <hch@lst.de>
Tue, 8 Jul 2014 10:25:28 +0000 (12:25 +0200)
committerJiri Slaby <jslaby@suse.cz>
Wed, 30 Jul 2014 09:15:55 +0000 (11:15 +0200)
commitb786221fb1e1c1664140d49a46b4bf844afc272c
tree2c1a90a4dcf359781cb09326d4386f5de2fce2ce
parentbe8e93639cc104bf9da5eee99f3cbd63ce8c6c7c
block: don't assume last put of shared tags is for the host

commit d45b3279a5a2252cafcd665bbf2db8c9b31ef783 upstream.

There is no inherent reason why the last put of a tag structure must be
the one for the Scsi_Host, as device model objects can be held for
arbitrary periods.  Merge blk_free_tags and __blk_free_tags into a single
funtion that just release a references and get rid of the BUG() when the
host reference wasn't the last.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
block/blk-tag.c