Merge branch 'master' into for-linus
This commit is contained in:
@@ -179,14 +179,11 @@ struct cgroup {
|
||||
*/
|
||||
struct list_head release_list;
|
||||
|
||||
/* pids_mutex protects the fields below */
|
||||
/* pids_mutex protects pids_list and cached pid arrays. */
|
||||
struct rw_semaphore pids_mutex;
|
||||
/* Array of process ids in the cgroup */
|
||||
pid_t *tasks_pids;
|
||||
/* How many files are using the current tasks_pids array */
|
||||
int pids_use_count;
|
||||
/* Length of the current tasks_pids array */
|
||||
int pids_length;
|
||||
|
||||
/* Linked list of struct cgroup_pids */
|
||||
struct list_head pids_list;
|
||||
|
||||
/* For RCU-protected deletion */
|
||||
struct rcu_head rcu_head;
|
||||
@@ -365,6 +362,23 @@ int cgroup_task_count(const struct cgroup *cgrp);
|
||||
/* Return true if cgrp is a descendant of the task's cgroup */
|
||||
int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task);
|
||||
|
||||
/*
|
||||
* When the subsys has to access css and may add permanent refcnt to css,
|
||||
* it should take care of racy conditions with rmdir(). Following set of
|
||||
* functions, is for stop/restart rmdir if necessary.
|
||||
* Because these will call css_get/put, "css" should be alive css.
|
||||
*
|
||||
* cgroup_exclude_rmdir();
|
||||
* ...do some jobs which may access arbitrary empty cgroup
|
||||
* cgroup_release_and_wakeup_rmdir();
|
||||
*
|
||||
* When someone removes a cgroup while cgroup_exclude_rmdir() holds it,
|
||||
* it sleeps and cgroup_release_and_wakeup_rmdir() will wake him up.
|
||||
*/
|
||||
|
||||
void cgroup_exclude_rmdir(struct cgroup_subsys_state *css);
|
||||
void cgroup_release_and_wakeup_rmdir(struct cgroup_subsys_state *css);
|
||||
|
||||
/*
|
||||
* Control Group subsystem type.
|
||||
* See Documentation/cgroups/cgroups.txt for details
|
||||
|
||||
47
include/linux/flex_array.h
Normal file
47
include/linux/flex_array.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#ifndef _FLEX_ARRAY_H
|
||||
#define _FLEX_ARRAY_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <asm/page.h>
|
||||
|
||||
#define FLEX_ARRAY_PART_SIZE PAGE_SIZE
|
||||
#define FLEX_ARRAY_BASE_SIZE PAGE_SIZE
|
||||
|
||||
struct flex_array_part;
|
||||
|
||||
/*
|
||||
* This is meant to replace cases where an array-like
|
||||
* structure has gotten too big to fit into kmalloc()
|
||||
* and the developer is getting tempted to use
|
||||
* vmalloc().
|
||||
*/
|
||||
|
||||
struct flex_array {
|
||||
union {
|
||||
struct {
|
||||
int element_size;
|
||||
int total_nr_elements;
|
||||
struct flex_array_part *parts[0];
|
||||
};
|
||||
/*
|
||||
* This little trick makes sure that
|
||||
* sizeof(flex_array) == PAGE_SIZE
|
||||
*/
|
||||
char padding[FLEX_ARRAY_BASE_SIZE];
|
||||
};
|
||||
};
|
||||
|
||||
#define FLEX_ARRAY_INIT(size, total) { { {\
|
||||
.element_size = (size), \
|
||||
.total_nr_elements = (total), \
|
||||
} } }
|
||||
|
||||
struct flex_array *flex_array_alloc(int element_size, int total, gfp_t flags);
|
||||
int flex_array_prealloc(struct flex_array *fa, int start, int end, gfp_t flags);
|
||||
void flex_array_free(struct flex_array *fa);
|
||||
void flex_array_free_parts(struct flex_array *fa);
|
||||
int flex_array_put(struct flex_array *fa, int element_nr, void *src,
|
||||
gfp_t flags);
|
||||
void *flex_array_get(struct flex_array *fa, int element_nr);
|
||||
|
||||
#endif /* _FLEX_ARRAY_H */
|
||||
@@ -1946,6 +1946,7 @@ extern void putname(const char *name);
|
||||
extern int register_blkdev(unsigned int, const char *);
|
||||
extern void unregister_blkdev(unsigned int, const char *);
|
||||
extern struct block_device *bdget(dev_t);
|
||||
extern struct block_device *bdgrab(struct block_device *bdev);
|
||||
extern void bd_set_size(struct block_device *, loff_t size);
|
||||
extern void bd_forget(struct inode *inode);
|
||||
extern void bdput(struct block_device *);
|
||||
|
||||
@@ -589,6 +589,7 @@ struct ata_device {
|
||||
#endif
|
||||
/* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */
|
||||
u64 n_sectors; /* size of device, if ATA */
|
||||
u64 n_native_sectors; /* native size, if ATA */
|
||||
unsigned int class; /* ATA_DEV_xxx */
|
||||
unsigned long unpark_deadline;
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#ifndef _PPS_H_
|
||||
#define _PPS_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define PPS_VERSION "5.3.6"
|
||||
#define PPS_MAX_SOURCES 16 /* should be enough... */
|
||||
|
||||
|
||||
@@ -394,6 +394,7 @@ extern void __do_SAK(struct tty_struct *tty);
|
||||
extern void disassociate_ctty(int priv);
|
||||
extern void no_tty(void);
|
||||
extern void tty_flip_buffer_push(struct tty_struct *tty);
|
||||
extern void tty_flush_to_ldisc(struct tty_struct *tty);
|
||||
extern void tty_buffer_free_all(struct tty_struct *tty);
|
||||
extern void tty_buffer_flush(struct tty_struct *tty);
|
||||
extern void tty_buffer_init(struct tty_struct *tty);
|
||||
|
||||
@@ -19,15 +19,6 @@ struct iovec
|
||||
__kernel_size_t iov_len; /* Must be size_t (1003.1g) */
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
struct kvec {
|
||||
void *iov_base; /* and that should *never* hold a userland pointer */
|
||||
size_t iov_len;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1)
|
||||
*/
|
||||
@@ -35,6 +26,13 @@ struct kvec {
|
||||
#define UIO_FASTIOV 8
|
||||
#define UIO_MAXIOV 1024
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
struct kvec {
|
||||
void *iov_base; /* and that should *never* hold a userland pointer */
|
||||
size_t iov_len;
|
||||
};
|
||||
|
||||
/*
|
||||
* Total number of bytes covered by an iovec.
|
||||
*
|
||||
@@ -53,5 +51,6 @@ static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs)
|
||||
}
|
||||
|
||||
unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user