Message ID | fbeeb5bca850f70e3e01744130d05239e5267c9c.1695731843.git.fdmanana@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: some fixes and cleanups around btrfs_cow_block() | expand |
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 602da318ba11..9849477c5e19 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -712,7 +712,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