diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/libcfs/workitem.c')
-rw-r--r-- | drivers/staging/lustre/lustre/libcfs/workitem.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/libcfs/workitem.c b/drivers/staging/lustre/lustre/libcfs/workitem.c index 65629579bd7d..c4afaeaf8310 100644 --- a/drivers/staging/lustre/lustre/libcfs/workitem.c +++ b/drivers/staging/lustre/lustre/libcfs/workitem.c @@ -288,8 +288,8 @@ cfs_wi_scheduler (void *arg) } cfs_wi_sched_unlock(sched); - cfs_wait_event_interruptible_exclusive(sched->ws_waitq, - !cfs_wi_sched_cansleep(sched), rc); + rc = wait_event_interruptible_exclusive(sched->ws_waitq, + !cfs_wi_sched_cansleep(sched)); cfs_wi_sched_lock(sched); } @@ -365,6 +365,7 @@ cfs_wi_sched_create(char *name, struct cfs_cpt_table *cptab, return -ENOMEM; strncpy(sched->ws_name, name, CFS_WS_NAME_LEN); + sched->ws_name[CFS_WS_NAME_LEN - 1] = '\0'; sched->ws_cptab = cptab; sched->ws_cpt = cpt; |