aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKirill Tkhai <ktkhai@parallels.com>2014-09-12 09:40:54 -0400
committerIngo Molnar <mingo@kernel.org>2014-09-19 06:35:17 -0400
commitf139caf2e89713687514d9db847a4fa2e29c87a2 (patch)
tree7f078637c477cd40aee60e19a2e5fbd08033fb5e
parent9c368b5b6eccce1cbd7f68142106b3b4ddb1c5b5 (diff)
sched, cleanup, treewide: Remove set_current_state(TASK_RUNNING) after schedule()
schedule(), io_schedule() and schedule_timeout() always return with TASK_RUNNING state set, so one more setting is unnecessary. (All places in patch are visible good, only exception is kiblnd_scheduler() from: drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c Its schedule() is one line above standard 3 lines of unified diff) No places where set_current_state() is used for mb(). Signed-off-by: Kirill Tkhai <ktkhai@parallels.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: http://lkml.kernel.org/r/1410529254.3569.23.camel@tkhai Cc: Alasdair Kergon <agk@redhat.com> Cc: Anil Belur <askb23@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Dave Kleikamp <shaggy@kernel.org> Cc: David Airlie <airlied@linux.ie> Cc: David Howells <dhowells@redhat.com> Cc: Dmitry Eremin <dmitry.eremin@intel.com> Cc: Frank Blaschka <blaschka@linux.vnet.ibm.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Helge Deller <deller@gmx.de> Cc: Isaac Huang <he.huang@intel.com> Cc: James E.J. Bottomley <JBottomley@parallels.com> Cc: James E.J. Bottomley <jejb@parisc-linux.org> Cc: J. Bruce Fields <bfields@fieldses.org> Cc: Jeff Dike <jdike@addtoit.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Jiri Slaby <jslaby@suse.cz> Cc: Laura Abbott <lauraa@codeaurora.org> Cc: Liang Zhen <liang.zhen@intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Masaru Nomura <massa.nomura@gmail.com> Cc: Michael Opdenacker <michael.opdenacker@free-electrons.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Mike Snitzer <snitzer@redhat.com> Cc: Neil Brown <neilb@suse.de> Cc: Oleg Drokin <green@linuxhacker.ru> Cc: Peng Tao <bergwolf@gmail.com> Cc: Richard Weinberger <richard@nod.at> Cc: Robert Love <robert.w.love@intel.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Trond Myklebust <trond.myklebust@primarydata.com> Cc: Ursula Braun <ursula.braun@de.ibm.com> Cc: Zi Shen Lim <zlim.lnx@gmail.com> Cc: devel@driverdev.osuosl.org Cc: dm-devel@redhat.com Cc: dri-devel@lists.freedesktop.org Cc: fcoe-devel@open-fcoe.org Cc: jfs-discussion@lists.sourceforge.net Cc: linux390@de.ibm.com Cc: linux-afs@lists.infradead.org Cc: linux-cris-kernel@axis.com Cc: linux-kernel@vger.kernel.org Cc: linux-nfs@vger.kernel.org Cc: linux-parisc@vger.kernel.org Cc: linux-raid@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: qla2xxx-upstream@qlogic.com Cc: user-mode-linux-devel@lists.sourceforge.net Cc: user-mode-linux-user@lists.sourceforge.net Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/cris/arch-v10/drivers/sync_serial.c1
-rw-r--r--arch/cris/arch-v32/drivers/sync_serial.c1
-rw-r--r--arch/um/drivers/random.c1
-rw-r--r--drivers/gpu/vga/vgaarb.c1
-rw-r--r--drivers/md/dm-bufio.c1
-rw-r--r--drivers/parisc/power.c1
-rw-r--r--drivers/s390/net/claw.c2
-rw-r--r--drivers/scsi/fcoe/fcoe.c1
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c1
-rw-r--r--drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c3
-rw-r--r--drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c1
-rw-r--r--drivers/staging/lustre/lustre/libcfs/fail.c1
-rw-r--r--drivers/tty/bfin_jtag_comm.c1
-rw-r--r--fs/afs/vlocation.c1
-rw-r--r--fs/jfs/jfs_logmgr.c2
-rw-r--r--fs/jfs/jfs_txnmgr.c3
-rw-r--r--fs/nfs/blocklayout/blocklayoutdev.c1
-rw-r--r--fs/nfs/blocklayout/blocklayoutdm.c1
-rw-r--r--fs/nfsd/nfs4recover.c1
-rw-r--r--kernel/time/hrtimer.c1
-rw-r--r--kernel/trace/ring_buffer_benchmark.c3
21 files changed, 0 insertions, 29 deletions
diff --git a/arch/cris/arch-v10/drivers/sync_serial.c b/arch/cris/arch-v10/drivers/sync_serial.c
index 29eb02ab3f25..0f3983241e60 100644
--- a/arch/cris/arch-v10/drivers/sync_serial.c
+++ b/arch/cris/arch-v10/drivers/sync_serial.c
@@ -1086,7 +1086,6 @@ static ssize_t sync_serial_write(struct file *file, const char *buf,
1086 } 1086 }
1087 local_irq_restore(flags); 1087 local_irq_restore(flags);
1088 schedule(); 1088 schedule();
1089 set_current_state(TASK_RUNNING);
1090 remove_wait_queue(&port->out_wait_q, &wait); 1089 remove_wait_queue(&port->out_wait_q, &wait);
1091 if (signal_pending(current)) 1090 if (signal_pending(current))
1092 return -EINTR; 1091 return -EINTR;
diff --git a/arch/cris/arch-v32/drivers/sync_serial.c b/arch/cris/arch-v32/drivers/sync_serial.c
index bbb806b68838..5a149134cfb5 100644
--- a/arch/cris/arch-v32/drivers/sync_serial.c
+++ b/arch/cris/arch-v32/drivers/sync_serial.c
@@ -1089,7 +1089,6 @@ static ssize_t sync_serial_write(struct file *file, const char *buf,
1089 } 1089 }
1090 1090
1091 schedule(); 1091 schedule();
1092 set_current_state(TASK_RUNNING);
1093 remove_wait_queue(&port->out_wait_q, &wait); 1092 remove_wait_queue(&port->out_wait_q, &wait);
1094 1093
1095 if (signal_pending(current)) 1094 if (signal_pending(current))
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c
index 9e3a72205827..dd16c902ff70 100644
--- a/arch/um/drivers/random.c
+++ b/arch/um/drivers/random.c
@@ -79,7 +79,6 @@ static ssize_t rng_dev_read (struct file *filp, char __user *buf, size_t size,
79 set_task_state(current, TASK_INTERRUPTIBLE); 79 set_task_state(current, TASK_INTERRUPTIBLE);
80 80
81 schedule(); 81 schedule();
82 set_task_state(current, TASK_RUNNING);
83 remove_wait_queue(&host_read_wait, &wait); 82 remove_wait_queue(&host_read_wait, &wait);
84 83
85 if (atomic_dec_and_test(&host_sleep_count)) { 84 if (atomic_dec_and_test(&host_sleep_count)) {
diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c
index d2077f040f3e..d07f810c7087 100644
--- a/drivers/gpu/vga/vgaarb.c
+++ b/drivers/gpu/vga/vgaarb.c
@@ -403,7 +403,6 @@ int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible)
403 } 403 }
404 schedule(); 404 schedule();
405 remove_wait_queue(&vga_wait_queue, &wait); 405 remove_wait_queue(&vga_wait_queue, &wait);
406 set_current_state(TASK_RUNNING);
407 } 406 }
408 return rc; 407 return rc;
409} 408}
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c
index ab472c557d18..0505559f0965 100644
--- a/drivers/md/dm-bufio.c
+++ b/drivers/md/dm-bufio.c
@@ -720,7 +720,6 @@ static void __wait_for_free_buffer(struct dm_bufio_client *c)
720 720
721 io_schedule(); 721 io_schedule();
722 722
723 set_task_state(current, TASK_RUNNING);
724 remove_wait_queue(&c->free_buffer_wait, &wait); 723 remove_wait_queue(&c->free_buffer_wait, &wait);
725 724
726 dm_bufio_lock(c); 725 dm_bufio_lock(c);
diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c
index 90cca5e3805f..ef31b77404ef 100644
--- a/drivers/parisc/power.c
+++ b/drivers/parisc/power.c
@@ -121,7 +121,6 @@ static int kpowerswd(void *param)
121 unsigned long soft_power_reg = (unsigned long) param; 121 unsigned long soft_power_reg = (unsigned long) param;
122 122
123 schedule_timeout_interruptible(pwrsw_enabled ? HZ : HZ/POWERSWITCH_POLL_PER_SEC); 123 schedule_timeout_interruptible(pwrsw_enabled ? HZ : HZ/POWERSWITCH_POLL_PER_SEC);
124 __set_current_state(TASK_RUNNING);
125 124
126 if (unlikely(!pwrsw_enabled)) 125 if (unlikely(!pwrsw_enabled))
127 continue; 126 continue;
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c
index fbc6701bef30..213e54ee8a66 100644
--- a/drivers/s390/net/claw.c
+++ b/drivers/s390/net/claw.c
@@ -481,7 +481,6 @@ claw_open(struct net_device *dev)
481 spin_unlock_irqrestore( 481 spin_unlock_irqrestore(
482 get_ccwdev_lock(privptr->channel[i].cdev), saveflags); 482 get_ccwdev_lock(privptr->channel[i].cdev), saveflags);
483 schedule(); 483 schedule();
484 set_current_state(TASK_RUNNING);
485 remove_wait_queue(&privptr->channel[i].wait, &wait); 484 remove_wait_queue(&privptr->channel[i].wait, &wait);
486 if(rc != 0) 485 if(rc != 0)
487 ccw_check_return_code(privptr->channel[i].cdev, rc); 486 ccw_check_return_code(privptr->channel[i].cdev, rc);
@@ -828,7 +827,6 @@ claw_release(struct net_device *dev)
828 spin_unlock_irqrestore( 827 spin_unlock_irqrestore(
829 get_ccwdev_lock(privptr->channel[i].cdev), saveflags); 828 get_ccwdev_lock(privptr->channel[i].cdev), saveflags);
830 schedule(); 829 schedule();
831 set_current_state(TASK_RUNNING);
832 remove_wait_queue(&privptr->channel[i].wait, &wait); 830 remove_wait_queue(&privptr->channel[i].wait, &wait);
833 if (rc != 0) { 831 if (rc != 0) {
834 ccw_check_return_code(privptr->channel[i].cdev, rc); 832 ccw_check_return_code(privptr->channel[i].cdev, rc);
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 00ee0ed642aa..4a8ac7d8c76b 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -1884,7 +1884,6 @@ retry:
1884 set_current_state(TASK_INTERRUPTIBLE); 1884 set_current_state(TASK_INTERRUPTIBLE);
1885 spin_unlock_bh(&p->fcoe_rx_list.lock); 1885 spin_unlock_bh(&p->fcoe_rx_list.lock);
1886 schedule(); 1886 schedule();
1887 set_current_state(TASK_RUNNING);
1888 goto retry; 1887 goto retry;
1889 } 1888 }
1890 1889
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index be9698d920c2..8b5a5dc129b4 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -4853,7 +4853,6 @@ qla2x00_do_dpc(void *data)
4853 "DPC handler sleeping.\n"); 4853 "DPC handler sleeping.\n");
4854 4854
4855 schedule(); 4855 schedule();
4856 __set_current_state(TASK_RUNNING);
4857 4856
4858 if (!base_vha->flags.init_done || ha->flags.mbox_busy) 4857 if (!base_vha->flags.init_done || ha->flags.mbox_busy)
4859 goto end_loop; 4858 goto end_loop;
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
index 306d72876432..b94f7436ec19 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
@@ -3215,7 +3215,6 @@ kiblnd_connd (void *arg)
3215 3215
3216 schedule_timeout(timeout); 3216 schedule_timeout(timeout);
3217 3217
3218 set_current_state(TASK_RUNNING);
3219 remove_wait_queue(&kiblnd_data.kib_connd_waitq, &wait); 3218 remove_wait_queue(&kiblnd_data.kib_connd_waitq, &wait);
3220 spin_lock_irqsave(&kiblnd_data.kib_connd_lock, flags); 3219 spin_lock_irqsave(&kiblnd_data.kib_connd_lock, flags);
3221 } 3220 }
@@ -3432,7 +3431,6 @@ kiblnd_scheduler(void *arg)
3432 busy_loops = 0; 3431 busy_loops = 0;
3433 3432
3434 remove_wait_queue(&sched->ibs_waitq, &wait); 3433 remove_wait_queue(&sched->ibs_waitq, &wait);
3435 set_current_state(TASK_RUNNING);
3436 spin_lock_irqsave(&sched->ibs_lock, flags); 3434 spin_lock_irqsave(&sched->ibs_lock, flags);
3437 } 3435 }
3438 3436
@@ -3507,7 +3505,6 @@ kiblnd_failover_thread(void *arg)
3507 3505
3508 rc = schedule_timeout(long_sleep ? cfs_time_seconds(10) : 3506 rc = schedule_timeout(long_sleep ? cfs_time_seconds(10) :
3509 cfs_time_seconds(1)); 3507 cfs_time_seconds(1));
3510 set_current_state(TASK_RUNNING);
3511 remove_wait_queue(&kiblnd_data.kib_failover_waitq, &wait); 3508 remove_wait_queue(&kiblnd_data.kib_failover_waitq, &wait);
3512 write_lock_irqsave(glock, flags); 3509 write_lock_irqsave(glock, flags);
3513 3510
diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
index 521439954fcb..9994fc66111b 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
@@ -2233,7 +2233,6 @@ ksocknal_connd (void *arg)
2233 nloops = 0; 2233 nloops = 0;
2234 schedule_timeout(timeout); 2234 schedule_timeout(timeout);
2235 2235
2236 set_current_state(TASK_RUNNING);
2237 remove_wait_queue(&ksocknal_data.ksnd_connd_waitq, &wait); 2236 remove_wait_queue(&ksocknal_data.ksnd_connd_waitq, &wait);
2238 spin_lock_bh(connd_lock); 2237 spin_lock_bh(connd_lock);
2239 } 2238 }
diff --git a/drivers/staging/lustre/lustre/libcfs/fail.c b/drivers/staging/lustre/lustre/libcfs/fail.c
index 1bf9c90b4789..e73ca3df9734 100644
--- a/drivers/staging/lustre/lustre/libcfs/fail.c
+++ b/drivers/staging/lustre/lustre/libcfs/fail.c
@@ -131,7 +131,6 @@ int __cfs_fail_timeout_set(__u32 id, __u32 value, int ms, int set)
131 id, ms); 131 id, ms);
132 set_current_state(TASK_UNINTERRUPTIBLE); 132 set_current_state(TASK_UNINTERRUPTIBLE);
133 schedule_timeout(cfs_time_seconds(ms) / 1000); 133 schedule_timeout(cfs_time_seconds(ms) / 1000);
134 set_current_state(TASK_RUNNING);
135 CERROR("cfs_fail_timeout id %x awake\n", id); 134 CERROR("cfs_fail_timeout id %x awake\n", id);
136 } 135 }
137 return ret; 136 return ret;
diff --git a/drivers/tty/bfin_jtag_comm.c b/drivers/tty/bfin_jtag_comm.c
index 8096fcbe2dc1..d7b198c400c7 100644
--- a/drivers/tty/bfin_jtag_comm.c
+++ b/drivers/tty/bfin_jtag_comm.c
@@ -77,7 +77,6 @@ bfin_jc_emudat_manager(void *arg)
77 pr_debug("waiting for readers\n"); 77 pr_debug("waiting for readers\n");
78 __set_current_state(TASK_UNINTERRUPTIBLE); 78 __set_current_state(TASK_UNINTERRUPTIBLE);
79 schedule(); 79 schedule();
80 __set_current_state(TASK_RUNNING);
81 continue; 80 continue;
82 } 81 }
83 82
diff --git a/fs/afs/vlocation.c b/fs/afs/vlocation.c
index b6df2e83809f..52976785a32c 100644
--- a/fs/afs/vlocation.c
+++ b/fs/afs/vlocation.c
@@ -130,7 +130,6 @@ static int afs_vlocation_access_vl_by_id(struct afs_vlocation *vl,
130 /* second+ BUSY - sleep a little bit */ 130 /* second+ BUSY - sleep a little bit */
131 set_current_state(TASK_UNINTERRUPTIBLE); 131 set_current_state(TASK_UNINTERRUPTIBLE);
132 schedule_timeout(1); 132 schedule_timeout(1);
133 __set_current_state(TASK_RUNNING);
134 } 133 }
135 continue; 134 continue;
136 } 135 }
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
index 0acddf60af55..bc462dcd7a40 100644
--- a/fs/jfs/jfs_logmgr.c
+++ b/fs/jfs/jfs_logmgr.c
@@ -1585,7 +1585,6 @@ void jfs_flush_journal(struct jfs_log *log, int wait)
1585 set_current_state(TASK_UNINTERRUPTIBLE); 1585 set_current_state(TASK_UNINTERRUPTIBLE);
1586 LOGGC_UNLOCK(log); 1586 LOGGC_UNLOCK(log);
1587 schedule(); 1587 schedule();
1588 __set_current_state(TASK_RUNNING);
1589 LOGGC_LOCK(log); 1588 LOGGC_LOCK(log);
1590 remove_wait_queue(&target->gcwait, &__wait); 1589 remove_wait_queue(&target->gcwait, &__wait);
1591 } 1590 }
@@ -2359,7 +2358,6 @@ int jfsIOWait(void *arg)
2359 set_current_state(TASK_INTERRUPTIBLE); 2358 set_current_state(TASK_INTERRUPTIBLE);
2360 spin_unlock_irq(&log_redrive_lock); 2359 spin_unlock_irq(&log_redrive_lock);
2361 schedule(); 2360 schedule();
2362 __set_current_state(TASK_RUNNING);
2363 } 2361 }
2364 } while (!kthread_should_stop()); 2362 } while (!kthread_should_stop());
2365 2363
diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c
index 564c4f279ac6..d595856453b2 100644
--- a/fs/jfs/jfs_txnmgr.c
+++ b/fs/jfs/jfs_txnmgr.c
@@ -136,7 +136,6 @@ static inline void TXN_SLEEP_DROP_LOCK(wait_queue_head_t * event)
136 set_current_state(TASK_UNINTERRUPTIBLE); 136 set_current_state(TASK_UNINTERRUPTIBLE);
137 TXN_UNLOCK(); 137 TXN_UNLOCK();
138 io_schedule(); 138 io_schedule();
139 __set_current_state(TASK_RUNNING);
140 remove_wait_queue(event, &wait); 139 remove_wait_queue(event, &wait);
141} 140}
142 141
@@ -2808,7 +2807,6 @@ int jfs_lazycommit(void *arg)
2808 set_current_state(TASK_INTERRUPTIBLE); 2807 set_current_state(TASK_INTERRUPTIBLE);
2809 LAZY_UNLOCK(flags); 2808 LAZY_UNLOCK(flags);
2810 schedule(); 2809 schedule();
2811 __set_current_state(TASK_RUNNING);
2812 remove_wait_queue(&jfs_commit_thread_wait, &wq); 2810 remove_wait_queue(&jfs_commit_thread_wait, &wq);
2813 } 2811 }
2814 } while (!kthread_should_stop()); 2812 } while (!kthread_should_stop());
@@ -2996,7 +2994,6 @@ int jfs_sync(void *arg)
2996 set_current_state(TASK_INTERRUPTIBLE); 2994 set_current_state(TASK_INTERRUPTIBLE);
2997 TXN_UNLOCK(); 2995 TXN_UNLOCK();
2998 schedule(); 2996 schedule();
2999 __set_current_state(TASK_RUNNING);
3000 } 2997 }
3001 } while (!kthread_should_stop()); 2998 } while (!kthread_should_stop());
3002 2999
diff --git a/fs/nfs/blocklayout/blocklayoutdev.c b/fs/nfs/blocklayout/blocklayoutdev.c
index 04303b5c9361..9fde840c42d3 100644
--- a/fs/nfs/blocklayout/blocklayoutdev.c
+++ b/fs/nfs/blocklayout/blocklayoutdev.c
@@ -146,7 +146,6 @@ nfs4_blk_decode_device(struct nfs_server *server,
146 146
147 set_current_state(TASK_UNINTERRUPTIBLE); 147 set_current_state(TASK_UNINTERRUPTIBLE);
148 schedule(); 148 schedule();
149 __set_current_state(TASK_RUNNING);
150 remove_wait_queue(&nn->bl_wq, &wq); 149 remove_wait_queue(&nn->bl_wq, &wq);
151 150
152 if (reply->status != BL_DEVICE_REQUEST_PROC) { 151 if (reply->status != BL_DEVICE_REQUEST_PROC) {
diff --git a/fs/nfs/blocklayout/blocklayoutdm.c b/fs/nfs/blocklayout/blocklayoutdm.c
index 8999cfddd866..b18680eb6b39 100644
--- a/fs/nfs/blocklayout/blocklayoutdm.c
+++ b/fs/nfs/blocklayout/blocklayoutdm.c
@@ -76,7 +76,6 @@ static void dev_remove(struct net *net, dev_t dev)
76 76
77 set_current_state(TASK_UNINTERRUPTIBLE); 77 set_current_state(TASK_UNINTERRUPTIBLE);
78 schedule(); 78 schedule();
79 __set_current_state(TASK_RUNNING);
80 remove_wait_queue(&nn->bl_wq, &wq); 79 remove_wait_queue(&nn->bl_wq, &wq);
81 80
82out: 81out:
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index 9c271f42604a..8f1af78ebb67 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -670,7 +670,6 @@ __cld_pipe_upcall(struct rpc_pipe *pipe, struct cld_msg *cmsg)
670 } 670 }
671 671
672 schedule(); 672 schedule();
673 set_current_state(TASK_RUNNING);
674 673
675 if (msg.errno < 0) 674 if (msg.errno < 0)
676 ret = msg.errno; 675 ret = msg.errno;
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 1c2fe7de2842..ab370ffffd53 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1776,7 +1776,6 @@ schedule_hrtimeout_range_clock(ktime_t *expires, unsigned long delta,
1776 */ 1776 */
1777 if (!expires) { 1777 if (!expires) {
1778 schedule(); 1778 schedule();
1779 __set_current_state(TASK_RUNNING);
1780 return -EINTR; 1779 return -EINTR;
1781 } 1780 }
1782 1781
diff --git a/kernel/trace/ring_buffer_benchmark.c b/kernel/trace/ring_buffer_benchmark.c
index 0434ff1b808e..3f9e328c30b5 100644
--- a/kernel/trace/ring_buffer_benchmark.c
+++ b/kernel/trace/ring_buffer_benchmark.c
@@ -205,7 +205,6 @@ static void ring_buffer_consumer(void)
205 break; 205 break;
206 206
207 schedule(); 207 schedule();
208 __set_current_state(TASK_RUNNING);
209 } 208 }
210 reader_finish = 0; 209 reader_finish = 0;
211 complete(&read_done); 210 complete(&read_done);
@@ -379,7 +378,6 @@ static int ring_buffer_consumer_thread(void *arg)
379 break; 378 break;
380 379
381 schedule(); 380 schedule();
382 __set_current_state(TASK_RUNNING);
383 } 381 }
384 __set_current_state(TASK_RUNNING); 382 __set_current_state(TASK_RUNNING);
385 383
@@ -407,7 +405,6 @@ static int ring_buffer_producer_thread(void *arg)
407 trace_printk("Sleeping for 10 secs\n"); 405 trace_printk("Sleeping for 10 secs\n");
408 set_current_state(TASK_INTERRUPTIBLE); 406 set_current_state(TASK_INTERRUPTIBLE);
409 schedule_timeout(HZ * SLEEP_TIME); 407 schedule_timeout(HZ * SLEEP_TIME);
410 __set_current_state(TASK_RUNNING);
411 } 408 }
412 409
413 if (kill_test) 410 if (kill_test)