]> git.neil.brown.name Git - LaFS.git/commitdiff
Move unmap_dblock closer to map.
authorNeilBrown <neilb@suse.de>
Thu, 3 Sep 2009 05:28:20 +0000 (15:28 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 3 Sep 2009 05:28:20 +0000 (15:28 +1000)
As this is an atomic region, keep it as short as possible.

orphan.c

index fce204394e83fb114c168f054f3d8195234f2549..0f3cf62184ef612ae428fdfe4dea3b855437e576 100644 (file)
--- a/orphan.c
+++ b/orphan.c
@@ -406,13 +406,13 @@ void lafs_orphan_release(struct fs *fs, struct datablock *b)
 
                or = map_dblock(ob1);
                or[ent] = last;
+               unmap_dblock(ob1, or);
                bbl->orphan_slot = b->orphan_slot;
                putdref(bbl, MKREF(orphan_blk));
                lafs_dirty_dblock(ob1);
                lafs_dirty_dblock(ob2);
                clear_bit(B_PinPending, &ob1->b.flags);
                clear_bit(B_PinPending, &ob2->b.flags);
-               unmap_dblock(ob1, or);
 
                /* The orphan reference on ob2 has moved to ob1
                 * and ob2 is now a 'reservation' reference.