Re: [PATCH] rbd: simplify __rbd_init_snaps_header()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/07/2012 06:27 PM, Alex Elder wrote:
On 08/07/2012 06:03 PM, Alex Elder wrote:
+            __rbd_remove_snap_dev(snap);
+
+            /* Done with this list entry; advance */
+
+            links = next;

This could just be links = links->next like you have later.

I just used "next" because I had it available here but not
below.  I do like consistency though so I'll make your
suggested change.

After looking at it again, I don't think you're right.

The reason is that __rbd_remove_snap_dev() actually unlinks
the "snap" from the list that contains it, and "links" at
this point is referring to &snap->node, which is modified
by the list deletion.

The assignment I had originally, which uses a saved copy
of links->next, is the correct one.  So I'll be committing
with my original version of this section of code.

                     -Alex

Ah, good point. That's fine then.

Josh
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux