On 3/23/07, Jan Engelhardt <[EMAIL PROTECTED]> wrote:
@@ -1383,7 +1380,7 @@ int loop_unregister_transfer(int number)

        xfer_funcs[n] = NULL;

-       for (lo = &loop_dev[0]; lo < &loop_dev[max_loop]; lo++) {
+       list_for_each_entry(lo, &loop_devices, lo_list) {
                mutex_lock(&lo->lo_ctl_mutex);

Don't you need to use loop_devices_lock to protect the linked list here?


+static struct loop_device *loop_find_dev(unsigned int number)
+{
+       struct loop_device *lo;
+       list_for_each_entry(lo, &loop_devices, lo_list)
+               if (lo->lo_number == number)
+                       return lo;
+       return NULL;

Here too with spin lock??
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to