Skip to content

Commit

Permalink
[PATCH] reiserfs: missing kmalloc failure check
Browse files Browse the repository at this point in the history
According to http://bugzilla.kernel.org/show_bug.cgi?id=5778
fs/reiserfs/file.c is missing this check.

Signed-off-by: Diego Calleja <diegocg@gmail.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
dcghub authored and Linus Torvalds committed Feb 1, 2006
1 parent 8c777cc commit e5dd259
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/reiserfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ static int reiserfs_allocate_blocks_for_region(struct reiserfs_transaction_handl

allocated_blocks = kmalloc((blocks_to_allocate + will_prealloc) *
sizeof(b_blocknr_t), GFP_NOFS);
if (!allocated_blocks)
return -ENOMEM;

/* First we compose a key to point at the writing position, we want to do
that outside of any locking region. */
Expand Down

0 comments on commit e5dd259

Please sign in to comment.