@@ -2605,7 +2605,7 @@ static inline int is_root_group_ioq(struct request_queue *q,
ssize_t elv_fairness_show(struct request_queue *q, char *name)
{
struct elv_fq_data *efqd;
- unsigned int data;
+ unsigned long data;
unsigned long flags;
spin_lock_irqsave(q->queue_lock, flags);
@@ -2619,17 +2619,17 @@ ssize_t elv_fairness_store(struct request_queue *q, const char *name,
size_t count)
{
struct elv_fq_data *efqd;
- unsigned int data;
+ unsigned long data;
unsigned long flags;
char *p = (char *)name;
data = simple_strtoul(p, &p, 10);
- if (data < 0)
+ if (!data)
data = 0;
- else if (data > INT_MAX)
- data = INT_MAX;
+ else
+ data = 1;
spin_lock_irqsave(q->queue_lock, flags);
efqd = &q->elevator->efqd;
@@ -359,7 +359,7 @@ struct elv_fq_data {
* throughput and focus more on providing fairness for sync
* queues.
*/
- int fairness;
+ unsigned long fairness;
};
extern int elv_slice_idle;