search for: 12a5a40

Displaying 1 result from an estimated 1 matches for "12a5a40".

Did you mean: 12a5840
2011 Feb 15
1
[PATCH] Btrfs: fix uncheck memory allocations
...ct disk_extent *old = exts; max *= 2; exts = kzalloc(sizeof(*exts) * max, GFP_NOFS); + if (!exts) { + ret = -ENOMEM; + goto out; + } memcpy(exts, old, sizeof(*exts) * nr); if (old != *extents) kfree(old); diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 8d392ed..12a5a40 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -287,6 +287,7 @@ static noinline int add_async_extent(struct async_cow *cow, struct async_extent *async_extent; async_extent = kmalloc(sizeof(*async_extent), GFP_NOFS); + BUG_ON(!async_extent); async_extent->start = start; async_e...