[PATCH] reiserfs missing kmalloc failure check

From: Diego Calleja
Date: Sun Jan 15 2006 - 19:47:10 EST


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@xxxxxxxxx>

Index: test/fs/reiserfs/file.c
===================================================================
--- test.orig/fs/reiserfs/file.c 2006-01-13 02:40:50.000000000 +0100
+++ test/fs/reiserfs/file.c 2006-01-16 01:41:36.000000000 +0100
@@ -192,6 +192,8 @@

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. */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/