Remove #ifdef for unsupported kernel version
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
parent
bcd6f4831c
commit
7e40570bbd
@ -1090,11 +1090,7 @@ static struct cas_classifier *_cas_cls_init(void)
|
|||||||
|
|
||||||
INIT_LIST_HEAD(&cls->rules);
|
INIT_LIST_HEAD(&cls->rules);
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)
|
|
||||||
cls->wq = alloc_workqueue("kcas_clsd", WQ_UNBOUND | WQ_FREEZABLE, 1);
|
cls->wq = alloc_workqueue("kcas_clsd", WQ_UNBOUND | WQ_FREEZABLE, 1);
|
||||||
#else
|
|
||||||
cls->wq = create_singlethread_workqueue("kcas_clsd");
|
|
||||||
#endif
|
|
||||||
if (!cls->wq) {
|
if (!cls->wq) {
|
||||||
kfree(cls);
|
kfree(cls);
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
|
@ -50,7 +50,6 @@ extern struct casdsk_module *casdsk_module;
|
|||||||
#define CASDSK_KERN_INFO KERN_INFO""CASDSK_PREFIX_SHORT
|
#define CASDSK_KERN_INFO KERN_INFO""CASDSK_PREFIX_SHORT
|
||||||
#define CASDSK_KERN_DEBUG KERN_DEBUG""CASDSK_PREFIX_SHORT
|
#define CASDSK_KERN_DEBUG KERN_DEBUG""CASDSK_PREFIX_SHORT
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 37)
|
|
||||||
static inline struct block_device *open_bdev_exclusive(const char *path,
|
static inline struct block_device *open_bdev_exclusive(const char *path,
|
||||||
fmode_t mode,
|
fmode_t mode,
|
||||||
void *holder)
|
void *holder)
|
||||||
@ -74,7 +73,6 @@ static inline void bd_release_from_disk(struct block_device *bdev,
|
|||||||
{
|
{
|
||||||
return bd_unlink_disk_holder(bdev, disk);
|
return bd_unlink_disk_holder(bdev, disk);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
|
||||||
#define KRETURN(x) ({ return (x); })
|
#define KRETURN(x) ({ return (x); })
|
||||||
|
Loading…
Reference in New Issue
Block a user