On Mon, 29 Oct 2007 08:22:19 +0800
"Yan Zheng" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Execution should goto label 'insert' when 'btrfs_next_leaf' return a
> non-zero value, otherwise the parameter 'slot' for
> 'btrfs_item_key_to_cpu' may be out of bounds. The original codes jump
> to label 'insert' only when 'btrfs_next_leaf' return a negative
> value.
I made one small change here:
> @@ -238,7 +236,7 @@ insert:
> csum_offset = 0;
> if (found_next) {
> u64 tmp = min((u64)i_size_read(inode), next_offset);
> - tmp -= offset + root->sectorsize - 1;
> + tmp -= offset - root->sectorsize + 1;
tmp -= offset & ~((u64)root->sectorsize - 1);
But I've pushed out all three patches.
-chris
_______________________________________________
Btrfs-devel mailing list
[email protected]
http://oss.oracle.com/mailman/listinfo/btrfs-devel