dm cache: fix spurious cell_defer when dealing with partial block at end of device
commitf5e3cd8f7b12622d6e84b68ff1fa8814987f99fb
authorJoe Thornber <ejt@redhat.com>
Fri, 28 Nov 2014 09:48:25 +0000 (28 09:48 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2015 18:27:46 +0000 (8 10:27 -0800)
tree95ae58e7d6cd149162e6fd659fed5598c86643fa
parent209914ddafb1d06208f6651765c32c91d1399f69
dm cache: fix spurious cell_defer when dealing with partial block at end of device

commit f824a2af3dfbbb766c02e19df21f985bceadf0ee upstream.

We never bother caching a partial block that is at the back end of the
origin device.  No cell ever gets locked, but the calling code was
assuming it was and trying to release it.

Now the code only releases if the cell has been set to a non NULL
value.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-cache-target.c