diff options
author | Kirill Tkhai <ktkhai@parallels.com> | 2014-09-12 09:40:54 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-09-19 06:35:17 -0400 |
commit | f139caf2e89713687514d9db847a4fa2e29c87a2 (patch) | |
tree | 7f078637c477cd40aee60e19a2e5fbd08033fb5e /fs/jfs | |
parent | 9c368b5b6eccce1cbd7f68142106b3b4ddb1c5b5 (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>
Diffstat (limited to 'fs/jfs')
-rw-r--r-- | fs/jfs/jfs_logmgr.c | 2 | ||||
-rw-r--r-- | fs/jfs/jfs_txnmgr.c | 3 |
2 files changed, 0 insertions, 5 deletions
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 | ||