On Tue, Jul 09, 2013 at 01:24:43PM -0700, Zach Brown wrote:
The original codes don't handle error gracefully and some places
forget to free memory. We can allocate memory before calling pretty_sizes(),
for example, we can use static memory allocation and we don't have to deal
with memory
Neat trick! A few neat-picks below.
Indeed, those are all good fixes.
As these are only trivial changes I'll fix them at commit time.
Great, thanks David!
- z
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More
The original codes don't handle error gracefully and some places
forget to free memory. We can allocate memory before calling pretty_sizes(),
for example, we can use static memory allocation and we don't have to deal
with memory allocation fails.
I agree that callers shouldn't have to know to
Hello, Zach
The original codes don't handle error gracefully and some places
forget to free memory. We can allocate memory before calling pretty_sizes(),
for example, we can use static memory allocation and we don't have to deal
with memory allocation fails.
I agree that callers shouldn't
From: Wang Shilong wangsl-f...@cn.fujitsu.com
In the original code, pretty_sizes() may return NULL in two cases:
1 Allocating memory dynamically fails
2 Overflow happens(size exceeds YB)
Since we are limited to 16EB both theoretically and practically
due to everything being 64bit, we can just