WorkStruct: make allyesconfig
[linux-2.6-block.git] / fs / ocfs2 / cluster / heartbeat.c
index 305cba3681fe0126b4d1e33dd58c3b0cc3bea8a5..4cd9a9580456cdf0313c4a5b75c6f0d4e2560884 100644 (file)
@@ -141,7 +141,7 @@ struct o2hb_region {
         * recognizes a node going up and down in one iteration */
        u64                     hr_generation;
 
-       struct work_struct      hr_write_timeout_work;
+       struct delayed_work     hr_write_timeout_work;
        unsigned long           hr_last_timeout_start;
 
        /* Used during o2hb_check_slot to hold a copy of the block
@@ -156,9 +156,11 @@ struct o2hb_bio_wait_ctxt {
        int               wc_error;
 };
 
-static void o2hb_write_timeout(void *arg)
+static void o2hb_write_timeout(struct work_struct *work)
 {
-       struct o2hb_region *reg = arg;
+       struct o2hb_region *reg =
+               container_of(work, struct o2hb_region,
+                            hr_write_timeout_work.work);
 
        mlog(ML_ERROR, "Heartbeat write timeout to device %s after %u "
             "milliseconds\n", reg->hr_dev_name,
@@ -1404,7 +1406,7 @@ static ssize_t o2hb_region_dev_write(struct o2hb_region *reg,
                goto out;
        }
 
-       INIT_WORK(&reg->hr_write_timeout_work, o2hb_write_timeout, reg);
+       INIT_DELAYED_WORK(&reg->hr_write_timeout_work, o2hb_write_timeout);
 
        /*
         * A node is considered live after it has beat LIVE_THRESHOLD