--- linux-2.6.18-rc3/fs/xfs/Kconfig 2006-07-30 14:15:36.000000000 +0800 +++ linux.new/fs/xfs/Kconfig 2006-07-31 16:22:32.000000000 +0800 @@ -17,6 +17,15 @@ system of your root partition is compiled as a module, you'll need to use an initial ramdisk (initrd) to boot. +config XFS_DEBUG + bool "XFS debugging" + depends on XFS_FS + help + If you are experiencing any problems with the XFS filesystem, say + Y here. This will result in additional debugging messages to be + written to the system log. Under normal circumstances, this + results in very little overhead. + config XFS_QUOTA bool "XFS Quota support" depends on XFS_FS --- linux-2.6.18-rc3/fs/xfs/xfs_btree.c 2006-07-30 14:15:36.000000000 +0800 +++ linux.new/fs/xfs/xfs_btree.c 2006-07-31 15:39:43.000000000 +0800 @@ -586,6 +586,9 @@ * Allocate a new cursor. */ cur = kmem_zone_zalloc(xfs_btree_cur_zone, KM_SLEEP); + if(!cur) + return NULL; + /* * Deduce the number of btree levels from the arguments. */ --- linux-2.6.18-rc3/fs/xfs/xfs_alloc.c 2006-07-30 14:15:36.000000000 +0800 +++ linux.new/fs/xfs/xfs_alloc.c 2006-07-31 16:09:04.000000000 +0800 @@ -649,6 +649,9 @@ */ bno_cur = xfs_btree_init_cursor(args->mp, args->tp, args->agbp, args->agno, XFS_BTNUM_BNO, NULL, 0); + if(!bno_cur) + return XFS_ERROR(ENOMEM); + /* * Lookup bno and minlen in the btree (minlen is irrelevant, really). * Look for the closest free block <= bno, it must contain bno