diff options
| author | Rafael J. Wysocki <rjw@sisk.pl> | 2009-07-30 13:38:04 -0400 |
|---|---|---|
| committer | Rafael J. Wysocki <rjw@sisk.pl> | 2009-07-30 13:38:04 -0400 |
| commit | 2e6713c7662cc5ebc7346b033c404cb2f708fd51 (patch) | |
| tree | 8492ea548fea2d8243e4af4b877906afc4e32783 /include/linux | |
| parent | b4093d6235b7e4249616651ee328600ced48a18a (diff) | |
| parent | 658874f05d040ca96eb5ba9b1c30ce0ff287d762 (diff) | |
Merge branch 'master' into for-linus
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/cgroup.h | 28 | ||||
| -rw-r--r-- | include/linux/flex_array.h | 47 | ||||
| -rw-r--r-- | include/linux/fs.h | 1 | ||||
| -rw-r--r-- | include/linux/libata.h | 1 | ||||
| -rw-r--r-- | include/linux/pps.h | 2 | ||||
| -rw-r--r-- | include/linux/tty.h | 1 | ||||
| -rw-r--r-- | include/linux/uio.h | 17 |
7 files changed, 81 insertions, 16 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 665fa70e4094..90bba9e62286 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
| @@ -179,14 +179,11 @@ struct cgroup { | |||
| 179 | */ | 179 | */ |
| 180 | struct list_head release_list; | 180 | struct list_head release_list; |
| 181 | 181 | ||
| 182 | /* pids_mutex protects the fields below */ | 182 | /* pids_mutex protects pids_list and cached pid arrays. */ |
| 183 | struct rw_semaphore pids_mutex; | 183 | struct rw_semaphore pids_mutex; |
| 184 | /* Array of process ids in the cgroup */ | 184 | |
| 185 | pid_t *tasks_pids; | 185 | /* Linked list of struct cgroup_pids */ |
| 186 | /* How many files are using the current tasks_pids array */ | 186 | struct list_head pids_list; |
| 187 | int pids_use_count; | ||
| 188 | /* Length of the current tasks_pids array */ | ||
| 189 | int pids_length; | ||
| 190 | 187 | ||
| 191 | /* For RCU-protected deletion */ | 188 | /* For RCU-protected deletion */ |
| 192 | struct rcu_head rcu_head; | 189 | struct rcu_head rcu_head; |
| @@ -366,6 +363,23 @@ int cgroup_task_count(const struct cgroup *cgrp); | |||
| 366 | int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task); | 363 | int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task); |
| 367 | 364 | ||
| 368 | /* | 365 | /* |
| 366 | * When the subsys has to access css and may add permanent refcnt to css, | ||
| 367 | * it should take care of racy conditions with rmdir(). Following set of | ||
| 368 | * functions, is for stop/restart rmdir if necessary. | ||
| 369 | * Because these will call css_get/put, "css" should be alive css. | ||
| 370 | * | ||
| 371 | * cgroup_exclude_rmdir(); | ||
| 372 | * ...do some jobs which may access arbitrary empty cgroup | ||
| 373 | * cgroup_release_and_wakeup_rmdir(); | ||
| 374 | * | ||
| 375 | * When someone removes a cgroup while cgroup_exclude_rmdir() holds it, | ||
| 376 | * it sleeps and cgroup_release_and_wakeup_rmdir() will wake him up. | ||
| 377 | */ | ||
| 378 | |||
| 379 | void cgroup_exclude_rmdir(struct cgroup_subsys_state *css); | ||
| 380 | void cgroup_release_and_wakeup_rmdir(struct cgroup_subsys_state *css); | ||
| 381 | |||
| 382 | /* | ||
| 369 | * Control Group subsystem type. | 383 | * Control Group subsystem type. |
| 370 | * See Documentation/cgroups/cgroups.txt for details | 384 | * See Documentation/cgroups/cgroups.txt for details |
| 371 | */ | 385 | */ |
diff --git a/include/linux/flex_array.h b/include/linux/flex_array.h new file mode 100644 index 000000000000..23c1ec79a31b --- /dev/null +++ b/include/linux/flex_array.h | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | #ifndef _FLEX_ARRAY_H | ||
| 2 | #define _FLEX_ARRAY_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | #include <asm/page.h> | ||
| 6 | |||
| 7 | #define FLEX_ARRAY_PART_SIZE PAGE_SIZE | ||
| 8 | #define FLEX_ARRAY_BASE_SIZE PAGE_SIZE | ||
| 9 | |||
| 10 | struct flex_array_part; | ||
| 11 | |||
| 12 | /* | ||
| 13 | * This is meant to replace cases where an array-like | ||
| 14 | * structure has gotten too big to fit into kmalloc() | ||
| 15 | * and the developer is getting tempted to use | ||
| 16 | * vmalloc(). | ||
| 17 | */ | ||
| 18 | |||
| 19 | struct flex_array { | ||
| 20 | union { | ||
| 21 | struct { | ||
| 22 | int element_size; | ||
| 23 | int total_nr_elements; | ||
| 24 | struct flex_array_part *parts[0]; | ||
| 25 | }; | ||
| 26 | /* | ||
| 27 | * This little trick makes sure that | ||
| 28 | * sizeof(flex_array) == PAGE_SIZE | ||
| 29 | */ | ||
| 30 | char padding[FLEX_ARRAY_BASE_SIZE]; | ||
| 31 | }; | ||
| 32 | }; | ||
| 33 | |||
| 34 | #define FLEX_ARRAY_INIT(size, total) { { {\ | ||
| 35 | .element_size = (size), \ | ||
| 36 | .total_nr_elements = (total), \ | ||
| 37 | } } } | ||
| 38 | |||
| 39 | struct flex_array *flex_array_alloc(int element_size, int total, gfp_t flags); | ||
| 40 | int flex_array_prealloc(struct flex_array *fa, int start, int end, gfp_t flags); | ||
| 41 | void flex_array_free(struct flex_array *fa); | ||
| 42 | void flex_array_free_parts(struct flex_array *fa); | ||
| 43 | int flex_array_put(struct flex_array *fa, int element_nr, void *src, | ||
| 44 | gfp_t flags); | ||
| 45 | void *flex_array_get(struct flex_array *fa, int element_nr); | ||
| 46 | |||
| 47 | #endif /* _FLEX_ARRAY_H */ | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 0872372184fe..a36ffa5a77a4 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -1946,6 +1946,7 @@ extern void putname(const char *name); | |||
| 1946 | extern int register_blkdev(unsigned int, const char *); | 1946 | extern int register_blkdev(unsigned int, const char *); |
| 1947 | extern void unregister_blkdev(unsigned int, const char *); | 1947 | extern void unregister_blkdev(unsigned int, const char *); |
| 1948 | extern struct block_device *bdget(dev_t); | 1948 | extern struct block_device *bdget(dev_t); |
| 1949 | extern struct block_device *bdgrab(struct block_device *bdev); | ||
| 1949 | extern void bd_set_size(struct block_device *, loff_t size); | 1950 | extern void bd_set_size(struct block_device *, loff_t size); |
| 1950 | extern void bd_forget(struct inode *inode); | 1951 | extern void bd_forget(struct inode *inode); |
| 1951 | extern void bdput(struct block_device *); | 1952 | extern void bdput(struct block_device *); |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 79b6d7fd4ac2..e5b6e33c6571 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -589,6 +589,7 @@ struct ata_device { | |||
| 589 | #endif | 589 | #endif |
| 590 | /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ | 590 | /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ |
| 591 | u64 n_sectors; /* size of device, if ATA */ | 591 | u64 n_sectors; /* size of device, if ATA */ |
| 592 | u64 n_native_sectors; /* native size, if ATA */ | ||
| 592 | unsigned int class; /* ATA_DEV_xxx */ | 593 | unsigned int class; /* ATA_DEV_xxx */ |
| 593 | unsigned long unpark_deadline; | 594 | unsigned long unpark_deadline; |
| 594 | 595 | ||
diff --git a/include/linux/pps.h b/include/linux/pps.h index cfe5c7214ec6..0194ab06177b 100644 --- a/include/linux/pps.h +++ b/include/linux/pps.h | |||
| @@ -22,6 +22,8 @@ | |||
| 22 | #ifndef _PPS_H_ | 22 | #ifndef _PPS_H_ |
| 23 | #define _PPS_H_ | 23 | #define _PPS_H_ |
| 24 | 24 | ||
| 25 | #include <linux/types.h> | ||
| 26 | |||
| 25 | #define PPS_VERSION "5.3.6" | 27 | #define PPS_VERSION "5.3.6" |
| 26 | #define PPS_MAX_SOURCES 16 /* should be enough... */ | 28 | #define PPS_MAX_SOURCES 16 /* should be enough... */ |
| 27 | 29 | ||
diff --git a/include/linux/tty.h b/include/linux/tty.h index 1488d8c81aac..e8c6c9136c97 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -394,6 +394,7 @@ extern void __do_SAK(struct tty_struct *tty); | |||
| 394 | extern void disassociate_ctty(int priv); | 394 | extern void disassociate_ctty(int priv); |
| 395 | extern void no_tty(void); | 395 | extern void no_tty(void); |
| 396 | extern void tty_flip_buffer_push(struct tty_struct *tty); | 396 | extern void tty_flip_buffer_push(struct tty_struct *tty); |
| 397 | extern void tty_flush_to_ldisc(struct tty_struct *tty); | ||
| 397 | extern void tty_buffer_free_all(struct tty_struct *tty); | 398 | extern void tty_buffer_free_all(struct tty_struct *tty); |
| 398 | extern void tty_buffer_flush(struct tty_struct *tty); | 399 | extern void tty_buffer_flush(struct tty_struct *tty); |
| 399 | extern void tty_buffer_init(struct tty_struct *tty); | 400 | extern void tty_buffer_init(struct tty_struct *tty); |
diff --git a/include/linux/uio.h b/include/linux/uio.h index b7fe13883bdb..98c114323a8b 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h | |||
| @@ -19,15 +19,6 @@ struct iovec | |||
| 19 | __kernel_size_t iov_len; /* Must be size_t (1003.1g) */ | 19 | __kernel_size_t iov_len; /* Must be size_t (1003.1g) */ |
| 20 | }; | 20 | }; |
| 21 | 21 | ||
| 22 | #ifdef __KERNEL__ | ||
| 23 | |||
| 24 | struct kvec { | ||
| 25 | void *iov_base; /* and that should *never* hold a userland pointer */ | ||
| 26 | size_t iov_len; | ||
| 27 | }; | ||
| 28 | |||
| 29 | #endif | ||
| 30 | |||
| 31 | /* | 22 | /* |
| 32 | * UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1) | 23 | * UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1) |
| 33 | */ | 24 | */ |
| @@ -35,6 +26,13 @@ struct kvec { | |||
| 35 | #define UIO_FASTIOV 8 | 26 | #define UIO_FASTIOV 8 |
| 36 | #define UIO_MAXIOV 1024 | 27 | #define UIO_MAXIOV 1024 |
| 37 | 28 | ||
| 29 | #ifdef __KERNEL__ | ||
| 30 | |||
| 31 | struct kvec { | ||
| 32 | void *iov_base; /* and that should *never* hold a userland pointer */ | ||
| 33 | size_t iov_len; | ||
| 34 | }; | ||
| 35 | |||
| 38 | /* | 36 | /* |
| 39 | * Total number of bytes covered by an iovec. | 37 | * Total number of bytes covered by an iovec. |
| 40 | * | 38 | * |
| @@ -53,5 +51,6 @@ static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs) | |||
| 53 | } | 51 | } |
| 54 | 52 | ||
| 55 | unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to); | 53 | unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to); |
| 54 | #endif | ||
| 56 | 55 | ||
| 57 | #endif | 56 | #endif |
