Use struct task_struct instead.
Also remove the unused libcfs_current() function, while I noticed it
doing this conversion.
Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
*/
typedef struct proc_dir_entry proc_dir_entry_t;
-/*
- * Task struct
- */
-typedef struct task_struct task_t;
#define DECL_JOURNAL_DATA void *journal_info
#define PUSH_JOURNAL do { \
journal_info = current->journal_info; \
int
kiblnd_thread_start(int (*fn)(void *arg), void *arg, char *name)
{
- task_t *task = kthread_run(fn, arg, name);
+ struct task_struct *task = kthread_run(fn, arg, name);
if (IS_ERR(task))
return PTR_ERR(task);
int
ksocknal_thread_start(int (*fn)(void *arg), void *arg, char *name)
{
- task_t *task = kthread_run(fn, arg, name);
+ struct task_struct *task = kthread_run(fn, arg, name);
if (IS_ERR(task))
return PTR_ERR(task);
int
stt_start_timer_thread (void)
{
- task_t *task;
+ struct task_struct *task;
LASSERT(!stt_data.stt_shuttingdown);
/**
* Debug information, the task is owning the page.
*/
- task_t *cp_task;
+ struct task_struct *cp_task;
/**
* Owning IO request in cl_page_state::CPS_PAGEOUT and
* cl_page_state::CPS_PAGEIN states. This field is maintained only in
* \see osc_lock_enqueue_wait(), lov_lock_cancel(), lov_sublock_wait().
*/
struct mutex cll_guard;
- task_t *cll_guarder;
+ struct task_struct *cll_guarder;
int cll_depth;
/**
* the owner for INTRANSIT state
*/
- task_t *cll_intransit_owner;
+ struct task_struct *cll_intransit_owner;
int cll_error;
/**
* Number of holds on a lock. A hold prevents a lock from being
struct cl_page_list {
unsigned pl_nr;
struct list_head pl_pages;
- task_t *pl_owner;
+ struct task_struct *pl_owner;
};
/**
/* l_lock.c */
struct lustre_lock {
int l_depth;
- task_t *l_owner;
+ struct task_struct *l_owner;
struct semaphore l_sem;
spinlock_t l_spin;
};
static int ldlm_bl_thread_start(struct ldlm_bl_pool *blp)
{
struct ldlm_bl_thread_data bltd = { .bltd_blp = blp };
- task_t *task;
+ struct task_struct *task;
init_completion(&bltd.bltd_comp);
bltd.bltd_num = atomic_read(&blp->blp_num_threads);
static int ldlm_pools_thread_start(void)
{
struct l_wait_info lwi = { 0 };
- task_t *task;
+ struct task_struct *task;
if (ldlm_pools_thread != NULL)
return -EALREADY;
void libcfs_debug_dumplog(void)
{
wait_queue_t wait;
- task_t *dumper;
+ struct task_struct *dumper;
/* we're being careful to ensure that the kernel thread is
* able to set our state to running as it exits before we
schedule();
}
-task_t *libcfs_current(void)
-{
- CWARN("current task struct is %p\n", current);
- return current;
-}
-
static int panic_notifier(struct notifier_block *self, unsigned long unused1,
void *unused2)
{
atomic_notifier_chain_unregister(&panic_notifier_list, &libcfs_panic_notifier);
}
-EXPORT_SYMBOL(libcfs_current);
-
-
EXPORT_SYMBOL(libcfs_run_upcall);
EXPORT_SYMBOL(libcfs_run_lbug_upcall);
EXPORT_SYMBOL(lbug_with_loc);
rc = 0;
while (nthrs > 0) {
char name[16];
- task_t *task;
+ struct task_struct *task;
+
spin_lock(&cfs_wi_data.wi_glock);
while (sched->ws_starting > 0) {
spin_unlock(&cfs_wi_data.wi_glock);
int ll_capa_thread_start(void)
{
- task_t *task;
+ struct task_struct *task;
init_waitqueue_head(&ll_capa_thread.t_ctl_waitq);
int ll_close_thread_start(struct ll_close_queue **lcq_ret)
{
struct ll_close_queue *lcq;
- task_t *task;
+ struct task_struct *task;
if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_CLOSE_THREAD))
return -EINTR;
struct ptlrpc_thread *thread = &sai->sai_agl_thread;
struct l_wait_info lwi = { 0 };
struct ll_inode_info *plli;
- task_t *task;
+ struct task_struct *task;
CDEBUG(D_READA, "start agl thread: [pid %d] [parent %.*s]\n",
current_pid(), parent->d_name.len, parent->d_name.name);
* Thread that acquired lov_object::lo_type_guard in an exclusive
* mode.
*/
- task_t *lo_owner;
+ struct task_struct *lo_owner;
};
/**
*/
int obd_zombie_impexp_init(void)
{
- task_t *task;
+ struct task_struct *task;
INIT_LIST_HEAD(&obd_zombie_imports);
INIT_LIST_HEAD(&obd_zombie_exports);
/**
* Thread that submitted this page for transfer. For debugging.
*/
- task_t *ops_submitter;
+ struct task_struct *ops_submitter;
/**
* Submit time - the time when the page is starting RPC. For debugging.
*/
/** lock covering this extent */
struct cl_lock *oe_osclock;
/** terminator of this extent. Must be true if this extent is in IO. */
- task_t *oe_owner;
+ struct task_struct *oe_owner;
/** return value of writeback. If somebody is waiting for this extent,
* this value can be known by outside world. */
int oe_rc;
spin_unlock(&imp->imp_lock);
{
- task_t *task;
+ struct task_struct *task;
/* bug 17802: XXX client_disconnect_export vs connect request
* race. if client will evicted at this time, we start
* invalidate thread without reference to import and import can
void ping_evictor_start(void)
{
- task_t *task;
+ struct task_struct *task;
if (++pet_refcount > 1)
return;
env = 1;
{
- task_t *task;
+ struct task_struct *task;
+
if (index >= 0) {
rc = ptlrpcd_bind(index, max);
if (rc < 0)
int sptlrpc_gc_init(void)
{
struct l_wait_info lwi = { 0 };
- task_t *task;
+ struct task_struct *task;
mutex_init(&sec_gc_mutex);
spin_lock_init(&sec_gc_list_lock);