diff options
| author | Diego Calleja <diegocg@gmail.com> | 2006-02-01 06:06:44 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-01 11:53:25 -0500 |
| commit | e5dd259f78ba0fd0c7bfc5c52179dbbff3eb48aa (patch) | |
| tree | 490eb5d878b54293b95e9fee5a377b1b5c688326 | |
| parent | 8c777cc4be1390862d053cbc002246e87572147b (diff) | |
[PATCH] reiserfs: missing kmalloc failure check
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>
| -rw-r--r-- | fs/reiserfs/file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c index ad6fa964b0e7..1cad5d066a5c 100644 --- a/fs/reiserfs/file.c +++ b/fs/reiserfs/file.c | |||
| @@ -192,6 +192,8 @@ static int reiserfs_allocate_blocks_for_region(struct reiserfs_transaction_handl | |||
| 192 | 192 | ||
| 193 | allocated_blocks = kmalloc((blocks_to_allocate + will_prealloc) * | 193 | allocated_blocks = kmalloc((blocks_to_allocate + will_prealloc) * |
| 194 | sizeof(b_blocknr_t), GFP_NOFS); | 194 | sizeof(b_blocknr_t), GFP_NOFS); |
| 195 | if (!allocated_blocks) | ||
| 196 | return -ENOMEM; | ||
| 195 | 197 | ||
| 196 | /* First we compose a key to point at the writing position, we want to do | 198 | /* First we compose a key to point at the writing position, we want to do |
| 197 | that outside of any locking region. */ | 199 | that outside of any locking region. */ |
