1
0
Fork 0

staging: lustre: remove task_t typedef

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>
hifive-unleashed-5.1
Greg Kroah-Hartman 2013-08-04 08:56:42 +08:00
parent e7e73793d1
commit 68b636b68e
21 changed files with 25 additions and 36 deletions

View File

@ -85,10 +85,6 @@ LL_PROC_PROTO(name) \
*/
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; \

View File

@ -1802,7 +1802,7 @@ kiblnd_recv (lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int delayed,
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);

View File

@ -1005,7 +1005,7 @@ ksocknal_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg)
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);

View File

@ -195,7 +195,7 @@ stt_timer_main (void *arg)
int
stt_start_timer_thread (void)
{
task_t *task;
struct task_struct *task;
LASSERT(!stt_data.stt_shuttingdown);

View File

@ -758,7 +758,7 @@ struct cl_page {
/**
* 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
@ -1576,13 +1576,13 @@ struct cl_lock {
* \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
@ -1869,7 +1869,7 @@ do { \
struct cl_page_list {
unsigned pl_nr;
struct list_head pl_pages;
task_t *pl_owner;
struct task_struct *pl_owner;
};
/**

View File

@ -96,7 +96,7 @@ void statfs_unpack(struct kstatfs *sfs, struct obd_statfs *osfs);
/* 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;
};

View File

@ -796,7 +796,7 @@ static int ldlm_bl_thread_main(void *arg);
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);

View File

@ -1339,7 +1339,7 @@ static int ldlm_pools_thread_main(void *arg)
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;

View File

@ -361,7 +361,7 @@ int libcfs_debug_dumplog_thread(void *arg)
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

View File

@ -170,12 +170,6 @@ void lbug_with_loc(struct libcfs_debug_msg_data *msgdata)
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)
{
@ -204,9 +198,6 @@ void libcfs_unregister_panic_notifier(void)
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);

View File

@ -376,7 +376,8 @@ cfs_wi_sched_create(char *name, struct cfs_cpt_table *cptab,
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);

View File

@ -289,7 +289,7 @@ void ll_capa_timer_callback(unsigned long unused)
int ll_capa_thread_start(void)
{
task_t *task;
struct task_struct *task;
init_waitqueue_head(&ll_capa_thread.t_ctl_waitq);

View File

@ -362,7 +362,7 @@ static int ll_close_thread(void *arg)
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;

View File

@ -1017,7 +1017,7 @@ static void ll_start_agl(struct dentry *parent, struct ll_statahead_info *sai)
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);

View File

@ -261,7 +261,7 @@ struct lov_object {
* Thread that acquired lov_object::lo_type_guard in an exclusive
* mode.
*/
task_t *lo_owner;
struct task_struct *lo_owner;
};
/**

View File

@ -1733,7 +1733,7 @@ static int obd_zombie_impexp_thread(void *unused)
*/
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);

View File

@ -374,7 +374,7 @@ struct osc_page {
/**
* 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.
*/
@ -660,7 +660,7 @@ struct osc_extent {
/** 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;

View File

@ -1305,7 +1305,7 @@ int ptlrpc_import_recovery_state_machine(struct obd_import *imp)
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

View File

@ -720,7 +720,7 @@ static int ping_evictor_main(void *arg)
void ping_evictor_start(void)
{
task_t *task;
struct task_struct *task;
if (++pet_refcount > 1)
return;

View File

@ -630,7 +630,8 @@ int ptlrpcd_start(int index, int max, const char *name, struct ptlrpcd_ctl *pc)
env = 1;
{
task_t *task;
struct task_struct *task;
if (index >= 0) {
rc = ptlrpcd_bind(index, max);
if (rc < 0)

View File

@ -217,7 +217,7 @@ again:
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);