Whamcloud - gitweb
LU-2450: Do not store and use unreferenced oap pointers
authorOleg Drokin <green@whamcloud.com>
Sun, 16 Dec 2012 20:21:49 +0000 (15:21 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 19 Dec 2012 19:28:59 +0000 (14:28 -0500)
commitd551b2293327635f3aeb667470a2b4fe13cbbc75
tree994e08a9290498757544f8771b719f9e77c9c1f1
parentd658d73b5231ba24d2e31315102c6e17dd247364
LU-2450: Do not store and use unreferenced oap pointers

osc_extent_finish looks for the last oap to see if it was a partial
write or not, and does it by storing a pointer to it, but by the time
we need the offsets from this OAP, it might have already been freed
because completion was called.
Change the code to store oap offset and byte count instead.

Change-Id: Id52743e701d9b090907eb42ff4648c589193f000
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4835
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/osc/osc_cache.c