aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2016-03-15 06:28:59 -0400
committerDavid Sterba <dsterba@suse.com>2016-03-22 05:08:47 -0400
commitce63f891e1a87ae79c4325dad5f512e8d6a8a78e (patch)
treed73406715785b0ce265bd85d5a54d22109420160
parent838fe1887765f4cc679febea60d87d2a06bd300e (diff)
btrfs: transaction_kthread() is not freezable
transaction_kthread() is calling try_to_freeze(), but that's just an expeinsive no-op given the fact that the thread is not marked freezable. After removing this, disk-io.c is now independent on freezer API. Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--fs/btrfs/disk-io.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index ff36a33ee9ca..81966676a26b 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -25,7 +25,6 @@
25#include <linux/buffer_head.h> 25#include <linux/buffer_head.h>
26#include <linux/workqueue.h> 26#include <linux/workqueue.h>
27#include <linux/kthread.h> 27#include <linux/kthread.h>
28#include <linux/freezer.h>
29#include <linux/slab.h> 28#include <linux/slab.h>
30#include <linux/migrate.h> 29#include <linux/migrate.h>
31#include <linux/ratelimit.h> 30#include <linux/ratelimit.h>
@@ -1928,14 +1927,12 @@ sleep:
1928 if (unlikely(test_bit(BTRFS_FS_STATE_ERROR, 1927 if (unlikely(test_bit(BTRFS_FS_STATE_ERROR,
1929 &root->fs_info->fs_state))) 1928 &root->fs_info->fs_state)))
1930 btrfs_cleanup_transaction(root); 1929 btrfs_cleanup_transaction(root);
1931 if (!try_to_freeze()) { 1930 set_current_state(TASK_INTERRUPTIBLE);
1932 set_current_state(TASK_INTERRUPTIBLE); 1931 if (!kthread_should_stop() &&
1933 if (!kthread_should_stop() && 1932 (!btrfs_transaction_blocked(root->fs_info) ||
1934 (!btrfs_transaction_blocked(root->fs_info) || 1933 cannot_commit))
1935 cannot_commit)) 1934 schedule_timeout(delay);
1936 schedule_timeout(delay); 1935 __set_current_state(TASK_RUNNING);
1937 __set_current_state(TASK_RUNNING);
1938 }
1939 } while (!kthread_should_stop()); 1936 } while (!kthread_should_stop());
1940 return 0; 1937 return 0;
1941} 1938}