~ubuntu-branches/ubuntu/vivid/blktap-dkms/vivid-proposed

« back to all changes in this revision

Viewing changes to ring.c

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2015-07-28 23:25:07 UTC
  • mfrom: (9.1.1 wily-proposed)
  • Revision ID: package-import@ubuntu.com-20150728232507-rulha87ttvrvotbw
Tags: 2.0.93-0.3ubuntu6~15.04.1
debian/rules: Stop recommending kernel headers, our DKMS packages
shouldn't do this, as we have no way of matching installed kernel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include <linux/blkdev.h>
28
28
#include <linux/mman.h>
29
29
#include <linux/mm.h>
 
30
#include <linux/version.h>
30
31
 
31
32
/* VM_RESERVED has disappeared starting from Linux 3.7 and has been
32
33
 * replaced by VM_DONTDUMP since then.
311
312
        unsigned int nsecs;
312
313
 
313
314
        breq->u.tr.nr_sectors    = nsecs = bio_sectors(bio);
 
315
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0)
 
316
        breq->u.tr.sector_number = bio->bi_sector;
 
317
#else
314
318
        breq->u.tr.sector_number = bio->bi_iter.bi_sector;
 
319
#endif
315
320
 
316
321
        return nsecs;
317
322
}