]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ocfs2/cluster/heartbeat.c
ocfs2: fix printk format warnings with OCFS2_FS_STATS=n
[linux-2.6-omap-h63xx.git] / fs / ocfs2 / cluster / heartbeat.c
index da2c2b442b4913e768812fa644dd78823979edee..f02ccb34604d5f855851eee98dc274f09787480e 100644 (file)
@@ -216,7 +216,7 @@ static void o2hb_wait_on_io(struct o2hb_region *reg,
        wait_for_completion(&wc->wc_io_complete);
 }
 
-static int o2hb_bio_end_io(struct bio *bio,
+static void o2hb_bio_end_io(struct bio *bio,
                           int error)
 {
        struct o2hb_bio_wait_ctxt *wc = bio->bi_private;
@@ -228,7 +228,6 @@ static int o2hb_bio_end_io(struct bio *bio,
 
        o2hb_bio_wait_dec(wc, 1);
        bio_put(bio);
-       return 0;
 }
 
 /* Setup a Bio to cover I/O against num_slots slots starting at
@@ -268,7 +267,7 @@ static struct bio *o2hb_setup_one_bio(struct o2hb_region *reg,
                current_page = cs / spp;
                page = reg->hr_slot_data[current_page];
 
-               vec_len = min(PAGE_CACHE_SIZE,
+               vec_len = min(PAGE_CACHE_SIZE - vec_start,
                              (max_slots-cs) * (PAGE_CACHE_SIZE/spp) );
 
                mlog(ML_HB_BIO, "page %d, vec_len = %u, vec_start = %u\n",
@@ -1373,7 +1372,7 @@ static ssize_t o2hb_region_pid_read(struct o2hb_region *reg,
 
        spin_lock(&o2hb_live_lock);
        if (reg->hr_task)
-               pid = reg->hr_task->pid;
+               pid = task_pid_nr(reg->hr_task);
        spin_unlock(&o2hb_live_lock);
 
        if (!pid)