Signed-off-by: Andy Whitcroft <apw@canonical.com>
return target_type_array[type]->execute_cmnd(cmnd);
}
+static void copy_io_context(struct io_context **pdst, struct io_context **psrc)
+{
+ struct io_context *src = *psrc;
+ struct io_context *dst = *pdst;
+
+ if (src) {
+ BUG_ON(atomic_long_read(&src->refcount) == 0);
+ atomic_long_inc(&src->refcount);
+ put_io_context(dst);
+ *pdst = src;
+ }
+}
+
static int worker_thread(void *arg)
{
struct worker_thread *wt = (struct worker_thread *) arg;