#include <linux/lustre_lite.h>
#include <linux/lustre_lib.h>
+#include <linux/lustre_compat25.h>
static int ll_commitcbd_check_event(struct ll_sb_info *sbi)
{
ENTRY;
lock_kernel();
- daemonize();
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- spin_lock_irqsave(¤t->sigmask_lock, flags);
- sigfillset(¤t->blocked);
- our_recalc_sigpending(current);
- spin_unlock_irqrestore(¤t->sigmask_lock, flags);
-#else
+ kportal_daemonize("lustre_commitcbd");
+
+ SIGNAL_MASK_LOCK(current, flags);
sigfillset(¤t->blocked);
- our_recalc_sigpending(current);
-#endif
+ RECALC_SIGPENDING;
+ SIGNAL_MASK_UNLOCK(current, flags);
- sprintf(current->comm, "lustre_commitcbd");
unlock_kernel();
/* Record that the thread is running */
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- sbi->ll_commitcbd_waketime = CURRENT_TIME;
-#else
- sbi->ll_commitcbd_waketime = CURRENT_TIME.tv_sec;
-#endif
+ sbi->ll_commitcbd_waketime = LTIME_S(CURRENT_TIME);
sbi->ll_commitcbd_timeout = 10 * HZ;
sbi->ll_commitcbd_thread = current;
sbi->ll_commitcbd_flags = LL_COMMITCBD_RUNNING;