It is possible to lose the ref on the parent that we
have before the final use to unlock, so make sure to
hold our own reference.
Signed-off-by: NeilBrown <neilb@suse.de>
return 1;
} else {
spin_unlock(&blk->inode->i_data.private_lock);
-
+ /* We own a ref through blk->parent now, but
+ * after lafs_incorporate, we might not
+ */
+ getiref(p,MKREF("addblock"));
lafs_iolock_written(&p->b);
lafs_incorporate(fs, p);
lafs_iounlock_block(&p->b);
+ putiref(p,MKREF("addblock"));
return 0;
}
}