* [PATCH] btrfs: Use schedule_timeout_interruptible
@ 2018-01-23 12:46 Nikolay Borisov
2018-01-24 15:38 ` Josef Bacik
0 siblings, 1 reply; 3+ messages in thread
From: Nikolay Borisov @ 2018-01-23 12:46 UTC (permalink / raw)
To: linux-btrfs; +Cc: Nikolay Borisov
Instead of manually fiddling with the state of the task
(RUNNING->INTERRUPTIBLE->RUNNING) again just use schedule_timeout_interruptible
which adjusts the task state as needed. No functional changes.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
fs/btrfs/disk-io.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index ed095202942f..f32d81ca1046 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1807,12 +1807,10 @@ static int transaction_kthread(void *arg)
if (unlikely(test_bit(BTRFS_FS_STATE_ERROR,
&fs_info->fs_state)))
btrfs_cleanup_transaction(fs_info);
- set_current_state(TASK_INTERRUPTIBLE);
if (!kthread_should_stop() &&
(!btrfs_transaction_blocked(fs_info) ||
cannot_commit))
- schedule_timeout(delay);
- __set_current_state(TASK_RUNNING);
+ schedule_timeout_interruptible(delay);
} while (!kthread_should_stop());
return 0;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] btrfs: Use schedule_timeout_interruptible
2018-01-23 12:46 [PATCH] btrfs: Use schedule_timeout_interruptible Nikolay Borisov
@ 2018-01-24 15:38 ` Josef Bacik
2018-01-30 14:10 ` David Sterba
0 siblings, 1 reply; 3+ messages in thread
From: Josef Bacik @ 2018-01-24 15:38 UTC (permalink / raw)
To: Nikolay Borisov; +Cc: linux-btrfs
On Tue, Jan 23, 2018 at 02:46:53PM +0200, Nikolay Borisov wrote:
> Instead of manually fiddling with the state of the task
> (RUNNING->INTERRUPTIBLE->RUNNING) again just use schedule_timeout_interruptible
> which adjusts the task state as needed. No functional changes.
>
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Thanks,
Josef
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] btrfs: Use schedule_timeout_interruptible
2018-01-24 15:38 ` Josef Bacik
@ 2018-01-30 14:10 ` David Sterba
0 siblings, 0 replies; 3+ messages in thread
From: David Sterba @ 2018-01-30 14:10 UTC (permalink / raw)
To: Josef Bacik; +Cc: Nikolay Borisov, linux-btrfs
On Wed, Jan 24, 2018 at 10:38:51AM -0500, Josef Bacik wrote:
> On Tue, Jan 23, 2018 at 02:46:53PM +0200, Nikolay Borisov wrote:
> > Instead of manually fiddling with the state of the task
> > (RUNNING->INTERRUPTIBLE->RUNNING) again just use schedule_timeout_interruptible
> > which adjusts the task state as needed. No functional changes.
> >
> > Signed-off-by: Nikolay Borisov <nborisov@suse.com>
>
> Reviewed-by: Josef Bacik <jbacik@fb.com>
Added to next, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-30 14:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-23 12:46 [PATCH] btrfs: Use schedule_timeout_interruptible Nikolay Borisov
2018-01-24 15:38 ` Josef Bacik
2018-01-30 14:10 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).