]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/nilfs2/bmap.c
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
[karo-tx-linux.git] / fs / nilfs2 / bmap.c
index f4a14ea2ed9c3d17f269260affcb82947109ed46..3dbdc1d356bfbcceaf218e8f1f8c292e6d2734b5 100644 (file)
@@ -26,6 +26,8 @@
 #include "nilfs.h"
 #include "bmap.h"
 #include "sb.h"
+#include "btree.h"
+#include "direct.h"
 #include "btnode.h"
 #include "mdt.h"
 #include "dat.h"
@@ -417,8 +419,8 @@ __u64 nilfs_bmap_data_get_key(const struct nilfs_bmap *bmap,
 
        key = page_index(bh->b_page) << (PAGE_CACHE_SHIFT -
                                         bmap->b_inode->i_blkbits);
-       for (pbh = page_buffers(bh->b_page); pbh != bh;
-            pbh = pbh->b_this_page, key++);
+       for (pbh = page_buffers(bh->b_page); pbh != bh; pbh = pbh->b_this_page)
+               key++;
 
        return key;
 }
@@ -533,7 +535,7 @@ void nilfs_bmap_init_gc(struct nilfs_bmap *bmap)
 
 void nilfs_bmap_init_gcdat(struct nilfs_bmap *gcbmap, struct nilfs_bmap *bmap)
 {
-       memcpy(gcbmap, bmap, sizeof(union nilfs_bmap_union));
+       memcpy(gcbmap, bmap, sizeof(*bmap));
        init_rwsem(&gcbmap->b_sem);
        lockdep_set_class(&bmap->b_sem, &nilfs_bmap_dat_lock_key);
        gcbmap->b_inode = &NILFS_BMAP_I(gcbmap)->vfs_inode;
@@ -541,7 +543,7 @@ void nilfs_bmap_init_gcdat(struct nilfs_bmap *gcbmap, struct nilfs_bmap *bmap)
 
 void nilfs_bmap_commit_gcdat(struct nilfs_bmap *gcbmap, struct nilfs_bmap *bmap)
 {
-       memcpy(bmap, gcbmap, sizeof(union nilfs_bmap_union));
+       memcpy(bmap, gcbmap, sizeof(*bmap));
        init_rwsem(&bmap->b_sem);
        lockdep_set_class(&bmap->b_sem, &nilfs_bmap_dat_lock_key);
        bmap->b_inode = &NILFS_BMAP_I(bmap)->vfs_inode;