]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: fix several uncheck memory allocations
authorliubo <liubo2009@cn.fujitsu.com>
Wed, 26 Jan 2011 06:22:08 +0000 (06:22 +0000)
committerChris Mason <chris.mason@oracle.com>
Fri, 28 Jan 2011 21:40:36 +0000 (16:40 -0500)
commit3f65b46ca2996da4d4a1e4762e7a41bd6e74193c
tree45a7939e9e061cb2f06b09ae5f48aa79853e1250
parent8759862addd0f43a8a219792bd275459434fda36
btrfs: fix several uncheck memory allocations

To make btrfs more stable, add several missing necessary memory allocation
checks, and when no memory, return proper errno.

We've checked that some of those -ENOMEM errors will be returned to
userspace, and some will be catched by BUG_ON() in the upper callers,
and none will be ignored silently.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/export.c
fs/btrfs/file-item.c
fs/btrfs/file.c
fs/btrfs/tree-log.c