btrfs: use round_down() to align block offset at btrfs_cow_block()
[linux-2.6-block.git] / fs / btrfs / ctree.c
index 49232b52639017d8bc9ae45a124e984e9365c481..e1af5cc698f9323d48db2cff853712bf01dbdc46 100644 (file)
@@ -718,7 +718,7 @@ int btrfs_cow_block(struct btrfs_trans_handle *trans,
                return 0;
        }
 
-       search_start = buf->start & ~((u64)SZ_1G - 1);
+       search_start = round_down(buf->start, SZ_1G);
 
        /*
         * Before CoWing this block for later modification, check if it's