]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ocfs2/localalloc.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-omap-h63xx.git] / fs / ocfs2 / localalloc.c
index add1ffdc5c6c75bb2accdb65972466f2651e80c8..ce0dc147602acdb409c339b0812027fa985731c2 100644 (file)
@@ -120,9 +120,6 @@ int ocfs2_load_local_alloc(struct ocfs2_super *osb)
 
        mlog_entry_void();
 
-       if (ocfs2_mount_local(osb))
-               goto bail;
-
        if (osb->local_alloc_size == 0)
                goto bail;
 
@@ -450,6 +447,8 @@ out_mutex:
        iput(main_bm_inode);
 
 out:
+       if (!status)
+               ocfs2_init_inode_steal_slot(osb);
        mlog_exit(status);
        return status;
 }
@@ -526,6 +525,8 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
        }
 
        ac->ac_inode = local_alloc_inode;
+       /* We should never use localalloc from another slot */
+       ac->ac_alloc_slot = osb->slot_num;
        ac->ac_which = OCFS2_AC_USE_LOCAL;
        get_bh(osb->local_alloc_bh);
        ac->ac_bh = osb->local_alloc_bh;
@@ -588,8 +589,7 @@ int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb,
        while(bits_wanted--)
                ocfs2_set_bit(start++, bitmap);
 
-       alloc->id1.bitmap1.i_used = cpu_to_le32(*num_bits +
-                               le32_to_cpu(alloc->id1.bitmap1.i_used));
+       le32_add_cpu(&alloc->id1.bitmap1.i_used, *num_bits);
 
        status = ocfs2_journal_dirty(handle, osb->local_alloc_bh);
        if (status < 0) {