summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_main.c
diff options
context:
space:
mode:
authorPhilipp Reisner2011-02-07 11:14:38 +0100
committerPhilipp Reisner2011-09-28 10:26:45 +0200
commitbc31fe3352f9cd76195ce6eb638dfc2dac17dc2e (patch)
tree2a44a2cf1faf699d47ff21bdb519fc8ac3697f0b /drivers/block/drbd/drbd_main.c
parentdrbd: Moved the thread name into the data structure (diff)
downloadkernel-qcow2-linux-bc31fe3352f9cd76195ce6eb638dfc2dac17dc2e.tar.gz
kernel-qcow2-linux-bc31fe3352f9cd76195ce6eb638dfc2dac17dc2e.tar.xz
kernel-qcow2-linux-bc31fe3352f9cd76195ce6eb638dfc2dac17dc2e.zip
drbd: Eliminated the user of drbd_task_to_thread()
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r--drivers/block/drbd/drbd_main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 852a3e3fbb76..ae995ed0e6f9 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -635,17 +635,15 @@ void drbd_calc_cpu_mask(struct drbd_conf *mdev)
/**
* drbd_thread_current_set_cpu() - modifies the cpu mask of the _current_ thread
* @mdev: DRBD device.
+ * @thi: drbd_thread object
*
* call in the "main loop" of _all_ threads, no need for any mutex, current won't die
* prematurely.
*/
-void drbd_thread_current_set_cpu(struct drbd_conf *mdev)
+void drbd_thread_current_set_cpu(struct drbd_conf *mdev, struct drbd_thread *thi)
{
struct task_struct *p = current;
- struct drbd_thread *thi = drbd_task_to_thread(mdev, p);
- if (!expect(thi != NULL))
- return;
if (!thi->reset_cpu_mask)
return;
thi->reset_cpu_mask = 0;