eCryptfs: dput dentries returned from dget_parent
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / linux / range.h
blobbd184a5db791bd81bf4c1917072746ab197c401d
1 #ifndef _LINUX_RANGE_H
2 #define _LINUX_RANGE_H
4 struct range {
5 u64 start;
6 u64 end;
7 };
9 int add_range(struct range *range, int az, int nr_range,
10 u64 start, u64 end);
13 int add_range_with_merge(struct range *range, int az, int nr_range,
14 u64 start, u64 end);
16 void subtract_range(struct range *range, int az, u64 start, u64 end);
18 int clean_sort_range(struct range *range, int az);
20 void sort_range(struct range *range, int nr_range);
22 #define MAX_RESOURCE ((resource_size_t)~0)
23 static inline resource_size_t cap_resource(u64 val)
25 if (val > MAX_RESOURCE)
26 return MAX_RESOURCE;
28 return val;
30 #endif