set_user_nice() not defined on 2.4.21+

Xiaogeng (Shawn) Jin xjin at redswitch.com
Fri Jan 10 13:21:59 EST 2003


Hi,

When compiled JFFS2 with kernel 2.4.21-pre3, the linker complains that 
the reference to set_user_nice() in function 
jffs2_garbage_collect_thread() hasn't been defined. I traced the code 
down to <linux/mtd/compatmac.h> and found that set_user_nice() is not 
defined if linux verion is equal or greater than 2.4.21. See the code 
below. Why? Does it mean that 2.4.21+ has already such a function 
defined somewhere else or that 2.4.21+ doesn't need it? Actually I 
searched 2.4.21-pre3 code and found no set_user_nice() defined except in 
<linux/mtd/compatmac.h>. I guess it's possibly a bug.

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)   /* Is this right? */
#define set_user_nice(tsk, n) do { (tsk)->priority = 20-(n); } while(0)
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,4,21) && 
!defined(RED_HAT_LINUX_KERNEL)
#define set_user_nice(tsk, n) do { (tsk)->nice = n; } while(0)
#endif

-- 
Shawn Jin
RedSwitch Inc.





More information about the linux-mtd mailing list