]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/block/loop.c
Merge master.kernel.org:/home/rmk/linux-2.6-serial
[linux-2.6-omap-h63xx.git] / drivers / block / loop.c
index 74bf0255e98f44dd2cc405426254a6e9b744f19d..3c74ea729fc79529ed766b98f3e1d2b78bb3da57 100644 (file)
@@ -818,7 +818,7 @@ static int loop_set_fd(struct loop_device *lo, struct file *lo_file,
        lo->lo_device = bdev;
        lo->lo_flags = lo_flags;
        lo->lo_backing_file = file;
-       lo->transfer = NULL;
+       lo->transfer = transfer_none;
        lo->ioctl = NULL;
        lo->lo_sizelimit = 0;
        lo->old_gfp_mask = mapping_gfp_mask(mapping);
@@ -839,7 +839,9 @@ static int loop_set_fd(struct loop_device *lo, struct file *lo_file,
 
        set_blocksize(bdev, lo_blocksize);
 
-       kernel_thread(loop_thread, lo, CLONE_KERNEL);
+       error = kernel_thread(loop_thread, lo, CLONE_KERNEL);
+       if (error < 0)
+               goto out_putf;
        wait_for_completion(&lo->lo_done);
        return 0;