staging: lustre: remove task_t typedef
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2013 00:56:42 +0000 (08:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2013 00:56:42 +0000 (08:56 +0800)
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>
21 files changed:
drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
drivers/staging/lustre/lnet/selftest/timer.c
drivers/staging/lustre/lustre/include/cl_object.h
drivers/staging/lustre/lustre/include/lustre_lib.h
drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
drivers/staging/lustre/lustre/libcfs/debug.c
drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c
drivers/staging/lustre/lustre/libcfs/workitem.c
drivers/staging/lustre/lustre/llite/llite_capa.c
drivers/staging/lustre/lustre/llite/llite_close.c
drivers/staging/lustre/lustre/llite/statahead.c
drivers/staging/lustre/lustre/lov/lov_cl_internal.h
drivers/staging/lustre/lustre/obdclass/genops.c
drivers/staging/lustre/lustre/osc/osc_cl_internal.h
drivers/staging/lustre/lustre/ptlrpc/import.c
drivers/staging/lustre/lustre/ptlrpc/pinger.c
drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c
drivers/staging/lustre/lustre/ptlrpc/sec_gc.c

index ae495a2ee434123accc85ebe13a272cb3c66ff26..c78f71a23592284d9de4a3efcf532f6b77de2434 100644 (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;   \
index 63a4258ac26151686386141138e0a07457e345ea..086ca3d7241b2b756a650bc647ab9450461f1a4a 100644 (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);
index 617570439be6ce5b847b9f93b3019b5940c2bf0f..727f352e88609d211b4e8a418eede08a1f7e02aa 100644 (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);
index 2c078550277b6b1fa1a34cc7a0ada7b11e43bd04..3bf4afb42ffe3c1bc03ea67bedbef87467b015d1 100644 (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);
 
index 4a478504c45ee9ecc10f7abb6c7c66fb0d39f47f..edb40afe66f122be83e83e4b871064a96dc8e30a 100644 (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;
 };
 
 /**
index e77a74540da7b2c069a5c7d675220575c8666b84..5e11107d4c66d99816d39faef66b6ef94b105426 100644 (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;
 };
index 3ede1a444afd307e18dc274932fe6810b9ecaf74..3916bda3004cf23c7fa58c7e51de5e621909cfc5 100644 (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);
index 00ff0edd5a2b50392d4c50bca76ee089563b994e..0593982f61c25d627cbfcc2f26974be80d6a1bb8 100644 (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;
index cf93b6c6d906a26a057a126903ef875b9a5db0fb..f7216de4cb4f14fcfc9f11efb9e8d8ee49ab5d0a 100644 (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
index ec3d97664b1b841090c0b5a4e4859096dd5ec24d..ab1e73168472445cc59b5b1e9c3165325684510b 100644 (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);
index b533666c19000fd0e7671a75773f8ff705555436..462172d1a7569a74c1ffbae3dd0c0f133574aa2e 100644 (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);
index 1d30181e3bcdc3ce9ff86af8d607451e87e5f246..edd512b20ee3a6f3589b5531f4073654e104f99b 100644 (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);
 
index 487ce6851d96becf0a7f8276dcdaec4396f939e0..1f5825c87a79cdb861c2e21976f8f12dd988d721 100644 (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;
index 2daca2e90b11387d9978528dbd6b3802733e9da3..8eaa38e91b9922084900660a08a6b15ecdb5cd08 100644 (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);
index a82dfeab59214b3b22e55cd6dec0932fa921be99..33d9ce68feddf8bb07fa70a56e7a81a7a76dff71 100644 (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;
 };
 
 /**
index bba1b35360d0f81e4a242940ec5e0e788d9a7adb..68fe71c8a2a9dbf0d8f18aa4f018debe38d842b7 100644 (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);
index 158e8fff838f4666d5f7c30cf3780376e79fa5d4..a3aa9b6596efc2f5ad83bce6983f777a9efeff46 100644 (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;
index 2cdbb4d909c97eb5758345e467bab5003d5fd208..5ca69aec72e1594ffc8235ede4447ee63c31ead8 100644 (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
index a9206e955cd3522cda52fd549b50bcb8afd0a012..227a0ae9593bc987d6bfbcf1757bc0a9eacf2288 100644 (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;
index 59c4f83af4468b6f66702aaed9559f44a04fcedc..fbdeff65d059df66f057cec95f729a5d3ad6ad63 100644 (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)
index 4c96a14a1bb6132e8f43de99037b619d8d18b023..d2eb20eb56dbc86cba29ce9e87985c7d9eabf399 100644 (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);