summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.ninka.net>2003-07-08 04:24:04 -0700
committerDavid S. Miller <davem@nuts.ninka.net>2003-07-08 04:24:04 -0700
commit6fee4e4eae95a053b1148537c1fe1ee9ff3d7a45 (patch)
treefea61da3aecfaa64c024bea99e9216039d61fc5a /include/linux
parent58af6e3af0578edece898ea59261812bad7a3576 (diff)
parenta1bafab5cbe2ce874fe5b0e012cc9ab74a672b39 (diff)
Resolve conflicts in ipconfig.c changes.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acct.h2
-rw-r--r--include/linux/affs_fs.h4
-rw-r--r--include/linux/blkdev.h92
-rw-r--r--include/linux/buffer_head.h7
-rw-r--r--include/linux/coda_linux.h2
-rw-r--r--include/linux/compat_ioctl.h2
-rw-r--r--include/linux/dcache.h3
-rw-r--r--include/linux/device.h13
-rw-r--r--include/linux/efs_fs.h2
-rw-r--r--include/linux/eisa.h21
-rw-r--r--include/linux/elevator.h17
-rw-r--r--include/linux/eventpoll.h35
-rw-r--r--include/linux/ext3_fs.h6
-rw-r--r--include/linux/ext3_fs_i.h10
-rw-r--r--include/linux/flat.h20
-rw-r--r--include/linux/fs.h14
-rw-r--r--include/linux/hfs_fs.h2
-rw-r--r--include/linux/interrupt.h4
-rw-r--r--include/linux/ioport.h1
-rw-r--r--include/linux/irq_cpustat.h4
-rw-r--r--include/linux/iso_fs.h2
-rw-r--r--include/linux/kernel_stat.h3
-rw-r--r--include/linux/kobject.h2
-rw-r--r--include/linux/mm.h26
-rw-r--r--include/linux/mman.h3
-rw-r--r--include/linux/mmzone.h7
-rw-r--r--include/linux/msdos_fs.h8
-rw-r--r--include/linux/namei.h17
-rw-r--r--include/linux/netdevice.h8
-rw-r--r--include/linux/nfs_fs.h2
-rw-r--r--include/linux/pci.h2
-rw-r--r--include/linux/proc_fs.h4
-rw-r--r--include/linux/qnx4_fs.h5
-rw-r--r--include/linux/quota.h10
-rw-r--r--include/linux/sched.h5
-rw-r--r--include/linux/security.h16
-rw-r--r--include/linux/sem.h1
-rw-r--r--include/linux/slab.h4
-rw-r--r--include/linux/sysfs.h5
-rw-r--r--include/linux/umsdos_fs.p4
40 files changed, 324 insertions, 71 deletions
diff --git a/include/linux/acct.h b/include/linux/acct.h
index 0b4ae8298a0e..69389c4af8e4 100644
--- a/include/linux/acct.h
+++ b/include/linux/acct.h
@@ -78,7 +78,7 @@ struct acct
#ifdef CONFIG_BSD_PROCESS_ACCT
struct super_block;
extern void acct_auto_close(struct super_block *sb);
-extern int acct_process(long exitcode);
+extern void acct_process(long exitcode);
#else
#define acct_auto_close(x) do { } while (0)
#define acct_process(x) do { } while (0)
diff --git a/include/linux/affs_fs.h b/include/linux/affs_fs.h
index 47ed05c8b744..c849309b1131 100644
--- a/include/linux/affs_fs.h
+++ b/include/linux/affs_fs.h
@@ -41,9 +41,9 @@ extern int affs_init_bitmap(struct super_block *sb);
/* namei.c */
extern int affs_hash_name(struct super_block *sb, const u8 *name, unsigned int len);
-extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry);
+extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *);
extern int affs_unlink(struct inode *dir, struct dentry *dentry);
-extern int affs_create(struct inode *dir, struct dentry *dentry, int mode);
+extern int affs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *);
extern int affs_mkdir(struct inode *dir, struct dentry *dentry, int mode);
extern int affs_rmdir(struct inode *dir, struct dentry *dentry);
extern int affs_link(struct dentry *olddentry, struct inode *dir,
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 786ea3563752..2e7f92aa1dc2 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -22,11 +22,62 @@ typedef struct elevator_s elevator_t;
struct request_pm_state;
#define BLKDEV_MIN_RQ 4
-#define BLKDEV_MAX_RQ 128
+#define BLKDEV_MAX_RQ 128 /* Default maximum */
+
+/*
+ * This is the per-process anticipatory I/O scheduler state.
+ */
+struct as_io_context {
+ spinlock_t lock;
+
+ void (*dtor)(struct as_io_context *aic); /* destructor */
+ void (*exit)(struct as_io_context *aic); /* called on task exit */
+
+ unsigned long state;
+ atomic_t nr_queued; /* queued reads & sync writes */
+ atomic_t nr_dispatched; /* number of requests gone to the drivers */
+
+ /* IO History tracking */
+ /* Thinktime */
+ unsigned long last_end_request;
+ unsigned long ttime_total;
+ unsigned long ttime_samples;
+ unsigned long ttime_mean;
+ /* Layout pattern */
+ long seek_samples;
+ sector_t last_request_pos;
+ sector_t seek_total;
+ sector_t seek_mean;
+};
+
+/*
+ * This is the per-process I/O subsystem state. It is refcounted and
+ * kmalloc'ed. Currently all fields are modified in process io context
+ * (apart from the atomic refcount), so require no locking.
+ */
+struct io_context {
+ atomic_t refcount;
+ pid_t pid;
+
+ /*
+ * For request batching
+ */
+ unsigned long last_waited; /* Time last woken after wait for request */
+ int nr_batch_requests; /* Number of requests left in the batch */
+
+ struct as_io_context *aic;
+};
+
+void put_io_context(struct io_context *ioc);
+void exit_io_context(void);
+struct io_context *get_io_context(int gfp_flags);
+void copy_io_context(struct io_context **pdst, struct io_context **psrc);
+void swap_io_context(struct io_context **ioc1, struct io_context **ioc2);
struct request_list {
int count[2];
mempool_t *rq_pool;
+ wait_queue_head_t wait[2];
};
/*
@@ -268,8 +319,15 @@ struct request_queue
spinlock_t *queue_lock;
/*
+ * queue kobject
+ */
+ struct kobject kobj;
+
+ /*
* queue settings
*/
+ unsigned long nr_requests; /* Max # of requests */
+
unsigned short max_sectors;
unsigned short max_phys_segments;
unsigned short max_hw_segments;
@@ -299,6 +357,8 @@ struct request_queue
#define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */
#define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */
#define QUEUE_FLAG_STOPPED 2 /* queue is stopped */
+#define QUEUE_FLAG_READFULL 3 /* write queue has been filled */
+#define QUEUE_FLAG_WRITEFULL 4 /* read queue has been filled */
#define blk_queue_plugged(q) !list_empty(&(q)->plug_list)
#define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags)
@@ -314,6 +374,30 @@ struct request_queue
#define rq_data_dir(rq) ((rq)->flags & 1)
+static inline int blk_queue_full(struct request_queue *q, int rw)
+{
+ if (rw == READ)
+ return test_bit(QUEUE_FLAG_READFULL, &q->queue_flags);
+ return test_bit(QUEUE_FLAG_WRITEFULL, &q->queue_flags);
+}
+
+static inline void blk_set_queue_full(struct request_queue *q, int rw)
+{
+ if (rw == READ)
+ set_bit(QUEUE_FLAG_READFULL, &q->queue_flags);
+ else
+ set_bit(QUEUE_FLAG_WRITEFULL, &q->queue_flags);
+}
+
+static inline void blk_clear_queue_full(struct request_queue *q, int rw)
+{
+ if (rw == READ)
+ clear_bit(QUEUE_FLAG_READFULL, &q->queue_flags);
+ else
+ clear_bit(QUEUE_FLAG_WRITEFULL, &q->queue_flags);
+}
+
+
/*
* mergeable request must not have _NOMERGE or _BARRIER bit set, nor may
* it already be started by driver.
@@ -397,6 +481,8 @@ struct sec_size {
unsigned block_size_bits;
};
+extern int blk_register_queue(struct gendisk *disk);
+extern void blk_unregister_queue(struct gendisk *disk);
extern void register_disk(struct gendisk *dev);
extern void generic_make_request(struct bio *bio);
extern void blk_put_request(struct request *);
@@ -560,6 +646,10 @@ static inline void put_dev_sector(Sector p)
page_cache_release(p.v);
}
+struct work_struct;
+int kblockd_schedule_work(struct work_struct *work);
+void kblockd_flush(void);
+
#ifdef CONFIG_LBD
# include <asm/div64.h>
# define sector_div(a, b) do_div(a, b)
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index 22d3ac8efc6b..1f468b0491ed 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -167,6 +167,7 @@ struct buffer_head *__find_get_block(struct block_device *, sector_t, int);
struct buffer_head * __getblk(struct block_device *, sector_t, int);
void __brelse(struct buffer_head *);
void __bforget(struct buffer_head *);
+void __breadahead(struct block_device *, sector_t block, int size);
struct buffer_head *__bread(struct block_device *, sector_t block, int size);
struct buffer_head *alloc_buffer_head(int gfp_flags);
void free_buffer_head(struct buffer_head * bh);
@@ -241,6 +242,12 @@ sb_bread(struct super_block *sb, sector_t block)
return __bread(sb->s_bdev, block, sb->s_blocksize);
}
+static inline void
+sb_breadahead(struct super_block *sb, sector_t block)
+{
+ __breadahead(sb->s_bdev, block, sb->s_blocksize);
+}
+
static inline struct buffer_head *
sb_getblk(struct super_block *sb, sector_t block)
{
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h
index b22d34fcfb6d..650a6f997f8a 100644
--- a/include/linux/coda_linux.h
+++ b/include/linux/coda_linux.h
@@ -38,7 +38,7 @@ extern struct file_operations coda_ioctl_operations;
int coda_open(struct inode *i, struct file *f);
int coda_flush(struct file *f);
int coda_release(struct inode *i, struct file *f);
-int coda_permission(struct inode *inode, int mask);
+int coda_permission(struct inode *inode, int mask, struct nameidata *nd);
int coda_revalidate_inode(struct dentry *);
int coda_getattr(struct vfsmount *, struct dentry *, struct kstat *);
int coda_setattr(struct dentry *, struct iattr *);
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h
index 076b1b268c7d..3fb888cc0c34 100644
--- a/include/linux/compat_ioctl.h
+++ b/include/linux/compat_ioctl.h
@@ -117,7 +117,7 @@ COMPATIBLE_IOCTL(START_ARRAY)
COMPATIBLE_IOCTL(STOP_ARRAY)
COMPATIBLE_IOCTL(STOP_ARRAY_RO)
COMPATIBLE_IOCTL(RESTART_ARRAY_RW)
-#ifdef CONFIG_DM
+#ifdef CONFIG_BLK_DEV_DM
/* DM */
COMPATIBLE_IOCTL(DM_VERSION)
COMPATIBLE_IOCTL(DM_REMOVE_ALL)
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 1442779bd893..a25d9f0443a4 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -10,6 +10,7 @@
#include <linux/rcupdate.h>
#include <asm/bug.h>
+struct nameidata;
struct vfsmount;
/*
@@ -106,7 +107,7 @@ struct dentry {
#define DNAME_INLINE_LEN (sizeof(struct dentry)-offsetof(struct dentry,d_iname))
struct dentry_operations {
- int (*d_revalidate)(struct dentry *, int);
+ int (*d_revalidate)(struct dentry *, struct nameidata *);
int (*d_hash) (struct dentry *, struct qstr *);
int (*d_compare) (struct dentry *, struct qstr *, struct qstr *);
int (*d_delete)(struct dentry *);
diff --git a/include/linux/device.h b/include/linux/device.h
index 1bd92551c077..2795b85ac6f1 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -18,6 +18,7 @@
#include <linux/spinlock.h>
#include <linux/types.h>
#include <linux/ioport.h>
+#include <linux/module.h>
#include <asm/semaphore.h>
#include <asm/atomic.h>
@@ -95,7 +96,7 @@ struct bus_attribute {
#define BUS_ATTR(_name,_mode,_show,_store) \
struct bus_attribute bus_attr_##_name = { \
- .attr = {.name = __stringify(_name), .mode = _mode }, \
+ .attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE }, \
.show = _show, \
.store = _store, \
};
@@ -136,7 +137,7 @@ struct driver_attribute {
#define DRIVER_ATTR(_name,_mode,_show,_store) \
struct driver_attribute driver_attr_##_name = { \
- .attr = {.name = __stringify(_name), .mode = _mode }, \
+ .attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE }, \
.show = _show, \
.store = _store, \
};
@@ -176,7 +177,7 @@ struct class_attribute {
#define CLASS_ATTR(_name,_mode,_show,_store) \
struct class_attribute class_attr_##_name = { \
- .attr = {.name = __stringify(_name), .mode = _mode }, \
+ .attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE }, \
.show = _show, \
.store = _store, \
};
@@ -215,6 +216,8 @@ extern void class_device_initialize(struct class_device *);
extern int class_device_add(struct class_device *);
extern void class_device_del(struct class_device *);
+extern int class_device_rename(struct class_device *, char *);
+
extern struct class_device * class_device_get(struct class_device *);
extern void class_device_put(struct class_device *);
@@ -226,7 +229,7 @@ struct class_device_attribute {
#define CLASS_DEVICE_ATTR(_name,_mode,_show,_store) \
struct class_device_attribute class_device_attr_##_name = { \
- .attr = {.name = __stringify(_name), .mode = _mode }, \
+ .attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE }, \
.show = _show, \
.store = _store, \
};
@@ -324,7 +327,7 @@ struct device_attribute {
#define DEVICE_ATTR(_name,_mode,_show,_store) \
struct device_attribute dev_attr_##_name = { \
- .attr = {.name = __stringify(_name), .mode = _mode }, \
+ .attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE }, \
.show = _show, \
.store = _store, \
};
diff --git a/include/linux/efs_fs.h b/include/linux/efs_fs.h
index c78e9c2a7b3a..1640eb875d4e 100644
--- a/include/linux/efs_fs.h
+++ b/include/linux/efs_fs.h
@@ -46,7 +46,7 @@ extern int efs_statfs(struct super_block *, struct kstatfs *);
extern void efs_read_inode(struct inode *);
extern efs_block_t efs_map_block(struct inode *, efs_block_t);
-extern struct dentry *efs_lookup(struct inode *, struct dentry *);
+extern struct dentry *efs_lookup(struct inode *, struct dentry *, struct nameidata *);
extern int efs_bmap(struct inode *, int);
#endif /* __EFS_FS_H__ */
diff --git a/include/linux/eisa.h b/include/linux/eisa.h
index d77fdf0f9f01..93e4c5503d46 100644
--- a/include/linux/eisa.h
+++ b/include/linux/eisa.h
@@ -4,6 +4,8 @@
#define EISA_SIG_LEN 8
#define EISA_MAX_SLOTS 8
+#define EISA_MAX_RESOURCES 4
+
/* A few EISA constants/offsets... */
#define EISA_DMA1_STATUS 8
@@ -17,6 +19,10 @@
#define EISA_INT1_EDGE_LEVEL 0x4D0
#define EISA_INT2_EDGE_LEVEL 0x4D1
#define EISA_VENDOR_ID_OFFSET 0xC80
+#define EISA_CONFIG_OFFSET 0xC84
+
+#define EISA_CONFIG_ENABLED 1
+#define EISA_CONFIG_FORCED 2
/* The EISA signature, in ASCII form, null terminated */
struct eisa_device_id {
@@ -26,19 +32,28 @@ struct eisa_device_id {
/* There is not much we can say about an EISA device, apart from
* signature, slot number, and base address. dma_mask is set by
- * default to 32 bits.*/
+ * default to parent device mask..*/
struct eisa_device {
struct eisa_device_id id;
int slot;
+ int state;
unsigned long base_addr;
- struct resource res;
+ struct resource res[EISA_MAX_RESOURCES];
u64 dma_mask;
struct device dev; /* generic device */
};
#define to_eisa_device(n) container_of(n, struct eisa_device, dev)
+static inline int eisa_get_region_index (void *addr)
+{
+ unsigned long x = (unsigned long) addr;
+
+ x &= 0xc00;
+ return (x >> 12);
+}
+
struct eisa_driver {
const struct eisa_device_id *id_table;
struct device_driver driver;
@@ -69,6 +84,8 @@ struct eisa_root_device {
struct resource *res;
unsigned long bus_base_addr;
int slots; /* Max slot number */
+ int force_probe; /* Probe even when no slot 0 */
+ u64 dma_mask; /* from bridge device */
int bus_nr; /* Set by eisa_root_register */
struct resource eisa_root_res; /* ditto */
};
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 522e51609ef3..b0e70562be94 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -15,6 +15,9 @@ typedef int (elevator_queue_empty_fn) (request_queue_t *);
typedef void (elevator_remove_req_fn) (request_queue_t *, struct request *);
typedef struct request *(elevator_request_list_fn) (request_queue_t *, struct request *);
typedef struct list_head *(elevator_get_sort_head_fn) (request_queue_t *, struct request *);
+typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *);
+typedef int (elevator_may_queue_fn) (request_queue_t *, int);
+
typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, int);
typedef void (elevator_put_req_fn) (request_queue_t *, struct request *);
@@ -32,6 +35,7 @@ struct elevator_s
elevator_remove_req_fn *elevator_remove_req_fn;
elevator_queue_empty_fn *elevator_queue_empty_fn;
+ elevator_completed_req_fn *elevator_completed_req_fn;
elevator_request_list_fn *elevator_former_req_fn;
elevator_request_list_fn *elevator_latter_req_fn;
@@ -39,6 +43,8 @@ struct elevator_s
elevator_set_req_fn *elevator_set_req_fn;
elevator_put_req_fn *elevator_put_req_fn;
+ elevator_may_queue_fn *elevator_may_queue_fn;
+
elevator_init_fn *elevator_init_fn;
elevator_exit_fn *elevator_exit_fn;
@@ -62,8 +68,10 @@ extern int elv_queue_empty(request_queue_t *);
extern struct request *elv_next_request(struct request_queue *q);
extern struct request *elv_former_request(request_queue_t *, struct request *);
extern struct request *elv_latter_request(request_queue_t *, struct request *);
-extern int elv_register_queue(struct gendisk *);
-extern void elv_unregister_queue(struct gendisk *);
+extern int elv_register_queue(request_queue_t *q);
+extern void elv_unregister_queue(request_queue_t *q);
+extern int elv_may_queue(request_queue_t *, int);
+extern void elv_completed_request(request_queue_t *, struct request *);
extern int elv_set_request(request_queue_t *, struct request *, int);
extern void elv_put_request(request_queue_t *, struct request *);
@@ -81,6 +89,11 @@ extern elevator_t elevator_noop;
*/
extern elevator_t iosched_deadline;
+/*
+ * anticipatory I/O scheduler
+ */
+extern elevator_t iosched_as;
+
extern int elevator_init(request_queue_t *, elevator_t *);
extern void elevator_exit(request_queue_t *);
extern inline int elv_rq_merge_ok(struct request *, struct bio *);
diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h
index 60f8cadb1f50..f89acbe8183a 100644
--- a/include/linux/eventpoll.h
+++ b/include/linux/eventpoll.h
@@ -14,6 +14,8 @@
#ifndef _LINUX_EVENTPOLL_H
#define _LINUX_EVENTPOLL_H
+#include <linux/types.h>
+
/* Valid opcodes to issue to sys_epoll_ctl() */
#define EPOLL_CTL_ADD 1
@@ -55,8 +57,37 @@ asmlinkage long sys_epoll_wait(int epfd, struct epoll_event *events, int maxeven
/* Used to initialize the epoll bits inside the "struct file" */
void eventpoll_init_file(struct file *file);
-/* Used in fs/file_table.c:__fput() to unlink files from the eventpoll interface */
-void eventpoll_release(struct file *file);
+/* Used to release the epoll bits inside the "struct file" */
+void eventpoll_release_file(struct file *file);
+
+/*
+ * This is called from inside fs/file_table.c:__fput() to unlink files
+ * from the eventpoll interface. We need to have this facility to cleanup
+ * correctly files that are closed without being removed from the eventpoll
+ * interface.
+ */
+static inline void eventpoll_release(struct file *file)
+{
+
+ /*
+ * Fast check to avoid the get/release of the semaphore. Since
+ * we're doing this outside the semaphore lock, it might return
+ * false negatives, but we don't care. It'll help in 99.99% of cases
+ * to avoid the semaphore lock. False positives simply cannot happen
+ * because the file in on the way to be removed and nobody ( but
+ * eventpoll ) has still a reference to this file.
+ */
+ if (likely(list_empty(&file->f_ep_links)))
+ return;
+
+ /*
+ * The file is being closed while it is still linked to an epoll
+ * descriptor. We need to handle this by correctly unlinking it
+ * from its containers.
+ */
+ eventpoll_release_file(file);
+}
+
#else
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h
index f077563bcfc3..c360f84fed3d 100644
--- a/include/linux/ext3_fs.h
+++ b/include/linux/ext3_fs.h
@@ -636,10 +636,14 @@ struct dx_hash_info
struct ext3_iloc
{
struct buffer_head *bh;
- struct ext3_inode *raw_inode;
+ unsigned long offset;
unsigned long block_group;
};
+static inline struct ext3_inode *ext3_raw_inode(struct ext3_iloc *iloc)
+{
+ return (struct ext3_inode *) (iloc->bh->b_data + iloc->offset);
+}
/*
* This structure is stuffed into the struct file's private_data field
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h
index 1a6a6c5922f7..1181cfae7142 100644
--- a/include/linux/ext3_fs_i.h
+++ b/include/linux/ext3_fs_i.h
@@ -62,6 +62,16 @@ struct ext3_inode_info {
__u32 i_prealloc_count;
#endif
__u32 i_dir_start_lookup;
+#ifdef CONFIG_EXT3_FS_XATTR
+ /*
+ * Extended attributes can be read independently of the main file
+ * data. Taking i_sem even when reading would cause contention
+ * between readers of EAs and writers of regular file data, so
+ * instead we synchronize on xattr_sem when reading or changing
+ * EAs.
+ */
+ struct rw_semaphore xattr_sem;
+#endif
#ifdef CONFIG_EXT3_FS_POSIX_ACL
struct posix_acl *i_acl;
struct posix_acl *i_default_acl;
diff --git a/include/linux/flat.h b/include/linux/flat.h
index 7643a3f9d3f5..ec56852e2659 100644
--- a/include/linux/flat.h
+++ b/include/linux/flat.h
@@ -1,7 +1,7 @@
-
-/* Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>
- * The Silver Hammer Group, Ltd.
- * Copyright (C) 2002 David McCullough <davidm@snapgear.com>
+/*
+ * Copyright (C) 2002-2003 David McCullough <davidm@snapgear.com>
+ * Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>
+ * The Silver Hammer Group, Ltd.
*
* This file provides the definitions and structures needed to
* support uClinux flat-format executables.
@@ -10,10 +10,18 @@
#ifndef _LINUX_FLAT_H
#define _LINUX_FLAT_H
+#ifdef __KERNEL__
#include <asm/flat.h>
+#endif
#define FLAT_VERSION 0x00000004L
+#ifdef CONFIG_BINFMT_SHARED_FLAT
+#define MAX_SHARED_LIBS (4)
+#else
+#define MAX_SHARED_LIBS (1)
+#endif
+
/*
* To make everything easier to port and manage cross platform
* development, all fields are in network byte order.
@@ -46,8 +54,10 @@ struct flat_hdr {
#define FLAT_FLAG_GOTPIC 0x0002 /* program is PIC with GOT */
#define FLAT_FLAG_GZIP 0x0004 /* all but the header is compressed */
#define FLAT_FLAG_GZDATA 0x0008 /* only data/relocs are compressed (for XIP) */
+#define FLAT_FLAG_KTRACE 0x0010 /* output useful kernel trace for debugging */
+#ifdef __KERNEL__ /* so systems without linux headers can compile the apps */
/*
* While it would be nice to keep this header clean, users of older
* tools still need this support in the kernel. So this section is
@@ -85,4 +95,6 @@ typedef union {
} reloc;
} flat_v2_reloc_t;
+#endif /* __KERNEL__ */
+
#endif /* _LINUX_FLAT_H */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index c3bda88631bc..77dd4b13dc43 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -420,6 +420,8 @@ struct file_ra_state {
unsigned long ahead_start; /* Ahead window */
unsigned long ahead_size;
unsigned long ra_pages; /* Maximum readahead window */
+ unsigned long mmap_hit; /* Cache hit stat for mmap accesses */
+ unsigned long mmap_miss; /* Cache miss stat for mmap accesses */
};
struct file {
@@ -639,7 +641,7 @@ static inline void unlock_super(struct super_block * sb)
/*
* VFS helper functions..
*/
-extern int vfs_create(struct inode *, struct dentry *, int);
+extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *);
extern int vfs_mkdir(struct inode *, struct dentry *, int);
extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t);
extern int vfs_symlink(struct inode *, struct dentry *, const char *);
@@ -730,8 +732,8 @@ struct file_operations {
};
struct inode_operations {
- int (*create) (struct inode *,struct dentry *,int);
- struct dentry * (*lookup) (struct inode *,struct dentry *);
+ int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
+ struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
int (*link) (struct dentry *,struct inode *,struct dentry *);
int (*unlink) (struct inode *,struct dentry *);
int (*symlink) (struct inode *,struct dentry *,const char *);
@@ -743,7 +745,7 @@ struct inode_operations {
int (*readlink) (struct dentry *, char __user *,int);
int (*follow_link) (struct dentry *, struct nameidata *);
void (*truncate) (struct inode *);
- int (*permission) (struct inode *, int);
+ int (*permission) (struct inode *, int, struct nameidata *);
int (*setattr) (struct dentry *, struct iattr *);
int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
@@ -1121,7 +1123,7 @@ extern int do_remount_sb(struct super_block *sb, int flags,
extern sector_t bmap(struct inode *, sector_t);
extern int setattr_mask(unsigned int);
extern int notify_change(struct dentry *, struct iattr *);
-extern int permission(struct inode *, int);
+extern int permission(struct inode *, int, struct nameidata *);
extern int vfs_permission(struct inode *, int);
extern int get_write_access(struct inode *);
extern int deny_write_access(struct file *);
@@ -1291,7 +1293,7 @@ extern int simple_prepare_write(struct file *file, struct page *page,
extern int simple_commit_write(struct file *file, struct page *page,
unsigned offset, unsigned to);
-extern struct dentry *simple_lookup(struct inode *, struct dentry *);
+extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *);
extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *);
extern struct file_operations simple_dir_operations;
extern struct inode_operations simple_dir_inode_operations;
diff --git a/include/linux/hfs_fs.h b/include/linux/hfs_fs.h
index 40971822e3e4..7bebd13150dd 100644
--- a/include/linux/hfs_fs.h
+++ b/include/linux/hfs_fs.h
@@ -234,7 +234,7 @@ extern struct hfs_cat_entry *hfs_cat_get(struct hfs_mdb *,
const struct hfs_cat_key *);
/* dir.c */
-extern int hfs_create(struct inode *, struct dentry *, int);
+extern int hfs_create(struct inode *, struct dentry *, int, struct nameidata *);
extern int hfs_mkdir(struct inode *, struct dentry *, int);
extern int hfs_unlink(struct inode *, struct dentry *);
extern int hfs_rmdir(struct inode *, struct dentry *);
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index da2eaeb18118..21e48723b386 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -94,8 +94,8 @@ struct softirq_action
asmlinkage void do_softirq(void);
extern void open_softirq(int nr, void (*action)(struct softirq_action*), void *data);
extern void softirq_init(void);
-#define __cpu_raise_softirq(cpu, nr) do { softirq_pending(cpu) |= 1UL << (nr); } while (0)
-extern void FASTCALL(cpu_raise_softirq(unsigned int cpu, unsigned int nr));
+#define __raise_softirq_irqoff(nr) do { local_softirq_pending() |= 1UL << (nr); } while (0)
+extern void FASTCALL(raise_softirq_irqoff(unsigned int nr));
extern void FASTCALL(raise_softirq(unsigned int nr));
#ifndef invoke_softirq
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 9193a8df0122..26d6293ed4c9 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -43,6 +43,7 @@ struct resource_list {
#define IORESOURCE_SHADOWABLE 0x00010000
#define IORESOURCE_BUS_HAS_VGA 0x00080000
+#define IORESOURCE_DISABLED 0x10000000
#define IORESOURCE_UNSET 0x20000000
#define IORESOURCE_AUTO 0x40000000
#define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */
diff --git a/include/linux/irq_cpustat.h b/include/linux/irq_cpustat.h
index 3f49c2ba63ed..03b3e17de805 100644
--- a/include/linux/irq_cpustat.h
+++ b/include/linux/irq_cpustat.h
@@ -29,10 +29,6 @@ extern irq_cpustat_t irq_stat[]; /* defined in asm/hardirq.h */
/* arch independent irq_stat fields */
#define softirq_pending(cpu) __IRQ_STAT((cpu), __softirq_pending)
#define local_softirq_pending() softirq_pending(smp_processor_id())
-#define syscall_count(cpu) __IRQ_STAT((cpu), __syscall_count)
-#define local_syscall_count() syscall_count(smp_processor_id())
-#define ksoftirqd_task(cpu) __IRQ_STAT((cpu), __ksoftirqd_task)
-#define local_ksoftirqd_task() ksoftirqd_task(smp_processor_id())
/* arch dependent irq_stat fields */
#define nmi_count(cpu) __IRQ_STAT((cpu), __nmi_count) /* i386 */
diff --git a/include/linux/iso_fs.h b/include/linux/iso_fs.h
index 4763b595287a..223f161da018 100644
--- a/include/linux/iso_fs.h
+++ b/include/linux/iso_fs.h
@@ -227,7 +227,7 @@ extern int isofs_name_translate(struct iso_directory_record *, char *, struct in
int get_joliet_filename(struct iso_directory_record *, unsigned char *, struct inode *);
int get_acorn_filename(struct iso_directory_record *, char *, struct inode *);
-extern struct dentry *isofs_lookup(struct inode *, struct dentry *);
+extern struct dentry *isofs_lookup(struct inode *, struct dentry *, struct nameidata *);
extern struct buffer_head *isofs_bread(struct inode *, sector_t);
extern int isofs_get_blocks(struct inode *, sector_t, struct buffer_head **, unsigned long);
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index 88425e94cdc5..9971827a3c4b 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -31,7 +31,8 @@ struct kernel_stat {
DECLARE_PER_CPU(struct kernel_stat, kstat);
#define kstat_cpu(cpu) per_cpu(kstat, cpu)
-#define kstat_this_cpu kstat_cpu(smp_processor_id())
+/* Must have preemption disabled for this to be meaningful. */
+#define kstat_this_cpu __get_cpu_var(kstat)
extern unsigned long nr_context_switches(void);
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 5d42248dd95f..e744a55d07d5 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -39,6 +39,8 @@ extern void kobject_cleanup(struct kobject *);
extern int kobject_add(struct kobject *);
extern void kobject_del(struct kobject *);
+extern void kobject_rename(struct kobject *, char *new_name);
+
extern int kobject_register(struct kobject *);
extern void kobject_unregister(struct kobject *);
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 492bc8aeb053..858914b2dbd3 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -339,9 +339,14 @@ static inline void set_page_zone(struct page *page, unsigned long zone_num)
page->flags |= zone_num << ZONE_SHIFT;
}
-static inline void * lowmem_page_address(struct page *page)
+#ifndef CONFIG_DISCONTIGMEM
+/* The array of struct pages - for discontigmem use pgdat->lmem_map */
+extern struct page *mem_map;
+#endif
+
+static inline void *lowmem_page_address(struct page *page)
{
- return __va( ( (page - page_zone(page)->zone_mem_map) + page_zone(page)->zone_start_pfn) << PAGE_SHIFT);
+ return __va(page_to_pfn(page) << PAGE_SHIFT);
}
#if defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL)
@@ -395,11 +400,6 @@ static inline int page_mapped(struct page *page)
#define VM_FAULT_MINOR 1
#define VM_FAULT_MAJOR 2
-#ifndef CONFIG_DISCONTIGMEM
-/* The array of struct pages - for discontigmem use pgdat->lmem_map */
-extern struct page *mem_map;
-#endif
-
extern void show_free_areas(void);
struct page *shmem_nopage(struct vm_area_struct * vma,
@@ -571,10 +571,6 @@ void page_cache_readahead(struct address_space *mapping,
struct file_ra_state *ra,
struct file *filp,
unsigned long offset);
-void page_cache_readaround(struct address_space *mapping,
- struct file_ra_state *ra,
- struct file *filp,
- unsigned long offset);
void handle_ra_miss(struct address_space *mapping,
struct file_ra_state *ra, pgoff_t offset);
unsigned long max_sane_readahead(unsigned long nr);
@@ -609,5 +605,13 @@ extern struct page * follow_page(struct mm_struct *mm, unsigned long address,
int write);
extern int remap_page_range(struct vm_area_struct *vma, unsigned long from,
unsigned long to, unsigned long size, pgprot_t prot);
+
+#ifndef CONFIG_DEBUG_PAGEALLOC
+static inline void
+kernel_map_pages(struct page *page, int numpages, int enable)
+{
+}
+#endif
+
#endif /* __KERNEL__ */
#endif /* _LINUX_MM_H */
diff --git a/include/linux/mman.h b/include/linux/mman.h
index 474d1c046436..a8956f6588ad 100644
--- a/include/linux/mman.h
+++ b/include/linux/mman.h
@@ -9,7 +9,8 @@
#define MREMAP_MAYMOVE 1
#define MREMAP_FIXED 2
-extern int vm_enough_memory(long pages);
+extern int sysctl_overcommit_memory;
+extern int sysctl_overcommit_ratio;
extern atomic_t vm_committed_space;
#ifdef CONFIG_SMP
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 21e95664fdf8..e768f7ab8963 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -184,12 +184,17 @@ typedef struct pglist_data {
unsigned long *valid_addr_bitmap;
struct bootmem_data *bdata;
unsigned long node_start_pfn;
- unsigned long node_size;
+ unsigned long node_present_pages; /* total number of physical pages */
+ unsigned long node_spanned_pages; /* total size of physical page
+ range, including holes */
int node_id;
struct pglist_data *pgdat_next;
wait_queue_head_t kswapd_wait;
} pg_data_t;
+#define node_present_pages(nid) (NODE_DATA(nid)->node_present_pages)
+#define node_spanned_pages(nid) (NODE_DATA(nid)->node_spanned_pages)
+
extern int numnodes;
extern struct pglist_data *pgdat_list;
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index 4268ed112436..1ce9ba2f57b0 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -307,8 +307,8 @@ extern int fat_scan(struct inode *dir, const char *name,
struct msdos_dir_entry **res_de, loff_t *i_pos);
/* msdos/namei.c - these are for Umsdos */
-extern struct dentry *msdos_lookup(struct inode *dir, struct dentry *);
-extern int msdos_create(struct inode *dir, struct dentry *dentry, int mode);
+extern struct dentry *msdos_lookup(struct inode *dir, struct dentry *, struct nameidata *);
+extern int msdos_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *);
extern int msdos_rmdir(struct inode *dir, struct dentry *dentry);
extern int msdos_mkdir(struct inode *dir, struct dentry *dentry, int mode);
extern int msdos_unlink(struct inode *dir, struct dentry *dentry);
@@ -317,8 +317,8 @@ extern int msdos_rename(struct inode *old_dir, struct dentry *old_dentry,
extern int msdos_fill_super(struct super_block *sb, void *data, int silent);
/* vfat/namei.c - these are for dmsdos */
-extern struct dentry *vfat_lookup(struct inode *dir, struct dentry *);
-extern int vfat_create(struct inode *dir, struct dentry *dentry, int mode);
+extern struct dentry *vfat_lookup(struct inode *dir, struct dentry *, struct nameidata *);
+extern int vfat_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *);
extern int vfat_rmdir(struct inode *dir, struct dentry *dentry);
extern int vfat_unlink(struct inode *dir, struct dentry *dentry);
extern int vfat_mkdir(struct inode *dir, struct dentry *dentry, int mode);
diff --git a/include/linux/namei.h b/include/linux/namei.h
index 16baf5cdb9c7..4117cd90a345 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -5,12 +5,22 @@
struct vfsmount;
+struct open_intent {
+ int flags;
+ int create_mode;
+};
+
struct nameidata {
struct dentry *dentry;
struct vfsmount *mnt;
struct qstr last;
unsigned int flags;
int last_type;
+
+ /* Intent data */
+ union {
+ struct open_intent open;
+ } intent;
};
/*
@@ -31,7 +41,12 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
#define LOOKUP_CONTINUE 4
#define LOOKUP_PARENT 16
#define LOOKUP_NOALT 32
-
+/*
+ * Intent data
+ */
+#define LOOKUP_OPEN (0x0100)
+#define LOOKUP_CREATE (0x0200)
+#define LOOKUP_ACCESS (0x0400)
extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *));
#define user_path_walk(name,nd) \
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index d79375c33273..3aef822b4493 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -561,7 +561,7 @@ static inline void __netif_schedule(struct net_device *dev)
cpu = smp_processor_id();
dev->next_sched = softnet_data[cpu].output_queue;
softnet_data[cpu].output_queue = dev;
- cpu_raise_softirq(cpu, NET_TX_SOFTIRQ);
+ raise_softirq_irqoff(NET_TX_SOFTIRQ);
local_irq_restore(flags);
}
}
@@ -612,7 +612,7 @@ static inline void dev_kfree_skb_irq(struct sk_buff *skb)
cpu = smp_processor_id();
skb->next = softnet_data[cpu].completion_queue;
softnet_data[cpu].completion_queue = skb;
- cpu_raise_softirq(cpu, NET_TX_SOFTIRQ);
+ raise_softirq_irqoff(NET_TX_SOFTIRQ);
local_irq_restore(flags);
}
}
@@ -779,7 +779,7 @@ static inline void __netif_rx_schedule(struct net_device *dev)
dev->quota += dev->weight;
else
dev->quota = dev->weight;
- __cpu_raise_softirq(cpu, NET_RX_SOFTIRQ);
+ __raise_softirq_irqoff(NET_RX_SOFTIRQ);
local_irq_restore(flags);
}
@@ -805,7 +805,7 @@ static inline int netif_rx_reschedule(struct net_device *dev, int undo)
local_irq_save(flags);
cpu = smp_processor_id();
list_add_tail(&dev->poll_list, &softnet_data[cpu].poll_list);
- __cpu_raise_softirq(cpu, NET_RX_SOFTIRQ);
+ __raise_softirq_irqoff(NET_RX_SOFTIRQ);
local_irq_restore(flags);
return 1;
}
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 3d7525998534..a6d594bb252c 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -240,7 +240,7 @@ extern struct inode *nfs_fhget(struct dentry *, struct nfs_fh *,
struct nfs_fattr *);
extern int __nfs_refresh_inode(struct inode *, struct nfs_fattr *);
extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
-extern int nfs_permission(struct inode *, int);
+extern int nfs_permission(struct inode *, int, struct nameidata *);
extern int nfs_open(struct inode *, struct file *);
extern int nfs_release(struct inode *, struct file *);
extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *);
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 3ceb5d7da821..a219c58ad88e 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -543,7 +543,7 @@ void pcibios_update_irq(struct pci_dev *, int irq);
/* Generic PCI functions used internally */
-int pci_bus_exists(const struct list_head *list, int nr);
+extern struct pci_bus *pci_find_bus(int domain, int busnr);
struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, struct pci_ops *ops, void *sysdata);
static inline struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *sysdata)
{
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index c0144a1ba4cb..e2e54ee6186d 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -92,7 +92,7 @@ extern struct proc_dir_entry *proc_root_kcore;
extern void proc_root_init(void);
extern void proc_misc_init(void);
-struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry);
+struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *);
struct dentry *proc_pid_unhash(struct task_struct *p);
void proc_pid_flush(struct dentry *proc_dentry);
int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir);
@@ -115,7 +115,7 @@ extern int proc_match(int, const char *,struct proc_dir_entry *);
* of the /proc/<pid> subdirectories.
*/
extern int proc_readdir(struct file *, void *, filldir_t);
-extern struct dentry *proc_lookup(struct inode *, struct dentry *);
+extern struct dentry *proc_lookup(struct inode *, struct dentry *, struct nameidata *);
extern struct file_operations proc_kcore_operations;
extern struct file_operations proc_kmsg_operations;
diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h
index 5710620989d5..53233c8fb3ef 100644
--- a/include/linux/qnx4_fs.h
+++ b/include/linux/qnx4_fs.h
@@ -110,21 +110,20 @@ struct qnx4_inode_info {
struct inode vfs_inode;
};
-extern struct dentry *qnx4_lookup(struct inode *dir, struct dentry *dentry);
+extern struct dentry *qnx4_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd);
extern unsigned long qnx4_count_free_blocks(struct super_block *sb);
extern unsigned long qnx4_block_map(struct inode *inode, long iblock);
extern struct buffer_head *qnx4_getblk(struct inode *, int, int);
extern struct buffer_head *qnx4_bread(struct inode *, int, int);
-extern int qnx4_create(struct inode *dir, struct dentry *dentry, int mode);
extern struct inode_operations qnx4_file_inode_operations;
extern struct inode_operations qnx4_dir_inode_operations;
extern struct file_operations qnx4_file_operations;
extern struct file_operations qnx4_dir_operations;
extern int qnx4_is_free(struct super_block *sb, long block);
extern int qnx4_set_bitmap(struct super_block *sb, long block, int busy);
-extern int qnx4_create(struct inode *inode, struct dentry *dentry, int mode);
+extern int qnx4_create(struct inode *inode, struct dentry *dentry, int mode, struct nameidata *nd);
extern void qnx4_truncate(struct inode *inode);
extern void qnx4_free_inode(struct inode *inode);
extern int qnx4_unlink(struct inode *dir, struct dentry *dentry);
diff --git a/include/linux/quota.h b/include/linux/quota.h
index 77d017472dc7..fbf2d2b2a5be 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -306,6 +306,16 @@ int register_quota_format(struct quota_format_type *fmt);
void unregister_quota_format(struct quota_format_type *fmt);
void init_dquot_operations(struct dquot_operations *fsdqops);
+struct quota_module_name {
+ int qm_fmt_id;
+ char *qm_mod_name;
+};
+
+#define INIT_QUOTA_MODULE_NAMES {\
+ {QFMT_VFS_OLD, "quota_v1"},\
+ {QFMT_VFS_V0, "quota_v2"},\
+ {0, NULL}}
+
#else
# /* nodep */ include <sys/cdefs.h>
diff --git a/include/linux/sched.h b/include/linux/sched.h
index ca97376901b0..750f2a12cada 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -321,6 +321,8 @@ struct k_itimer {
};
+struct io_context; /* See blkdev.h */
+void exit_io_context(void);
struct task_struct {
volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
@@ -450,6 +452,8 @@ struct task_struct {
struct dentry *proc_dentry;
struct backing_dev_info *backing_dev_info;
+ struct io_context *io_context;
+
unsigned long ptrace_message;
siginfo_t *last_siginfo; /* For ptrace use. */
};
@@ -481,6 +485,7 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0)
#define PF_KSWAPD 0x00040000 /* I am kswapd */
#define PF_SWAPOFF 0x00080000 /* I am in swapoff */
#define PF_LESS_THROTTLE 0x01000000 /* Throttle me less: I clena memory */
+#define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */
#ifdef CONFIG_SMP
extern int set_cpus_allowed(task_t *p, unsigned long new_mask);
diff --git a/include/linux/security.h b/include/linux/security.h
index 9589f99c3ef3..4d91dfc52c52 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -49,6 +49,7 @@ extern int cap_bprm_secureexec(struct linux_binprm *bprm);
extern int cap_task_post_setuid (uid_t old_ruid, uid_t old_euid, uid_t old_suid, int flags);
extern void cap_task_reparent_to_init (struct task_struct *p);
extern int cap_syslog (int type);
+extern int cap_vm_enough_memory (long pages);
static inline int cap_netlink_send (struct sk_buff *skb)
{
@@ -958,6 +959,10 @@ struct swap_info_struct;
* See the syslog(2) manual page for an explanation of the @type values.
* @type contains the type of action.
* Return 0 if permission is granted.
+ * @vm_enough_memory:
+ * Check permissions for allocating a new virtual mapping.
+ * @pages contains the number of pages.
+ * Return 0 if permission is granted.
*
* @register_security:
* allow module stacking.
@@ -989,6 +994,7 @@ struct security_operations {
int (*quotactl) (int cmds, int type, int id, struct super_block * sb);
int (*quota_on) (struct file * f);
int (*syslog) (int type);
+ int (*vm_enough_memory) (long pages);
int (*bprm_alloc_security) (struct linux_binprm * bprm);
void (*bprm_free_security) (struct linux_binprm * bprm);
@@ -1238,6 +1244,11 @@ static inline int security_syslog(int type)
return security_ops->syslog(type);
}
+static inline int security_vm_enough_memory(long pages)
+{
+ return security_ops->vm_enough_memory(pages);
+}
+
static inline int security_bprm_alloc (struct linux_binprm *bprm)
{
return security_ops->bprm_alloc_security (bprm);
@@ -1898,6 +1909,11 @@ static inline int security_syslog(int type)
return cap_syslog(type);
}
+static inline int security_vm_enough_memory(long pages)
+{
+ return cap_vm_enough_memory(pages);
+}
+
static inline int security_bprm_alloc (struct linux_binprm *bprm)
{
return 0;
diff --git a/include/linux/sem.h b/include/linux/sem.h
index 2821bc07f647..6e13e5efc163 100644
--- a/include/linux/sem.h
+++ b/include/linux/sem.h
@@ -109,7 +109,6 @@ struct sem_queue {
int id; /* internal sem id */
struct sembuf * sops; /* array of pending operations */
int nsops; /* number of operations */
- int alter; /* operation will alter semaphore */
};
/* Each task has a list of undo requests. They are executed automatically
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 843c8d638d29..d797c981f37e 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -114,6 +114,10 @@ extern kmem_cache_t *signal_cachep;
extern kmem_cache_t *sighand_cachep;
extern kmem_cache_t *bio_cachep;
+void ptrinfo(unsigned long addr);
+
+extern atomic_t slab_reclaim_pages;
+
#endif /* __KERNEL__ */
#endif /* _LINUX_SLAB_H */
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index f054416c8145..441c0d91f583 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -10,9 +10,11 @@
#define _SYSFS_H_
struct kobject;
+struct module;
struct attribute {
char * name;
+ struct module * owner;
mode_t mode;
};
@@ -37,6 +39,9 @@ sysfs_create_dir(struct kobject *);
extern void
sysfs_remove_dir(struct kobject *);
+extern void
+sysfs_rename_dir(struct kobject *, char *new_name);
+
extern int
sysfs_create_file(struct kobject *, struct attribute *);
diff --git a/include/linux/umsdos_fs.p b/include/linux/umsdos_fs.p
index 7034b7eb6b16..1c284c5a7aec 100644
--- a/include/linux/umsdos_fs.p
+++ b/include/linux/umsdos_fs.p
@@ -10,7 +10,7 @@ char * umsdos_d_path(struct dentry *, char *, int);
void umsdos_lookup_patch_new(struct dentry *, struct umsdos_info *);
int umsdos_is_pseudodos (struct inode *dir, struct dentry *dentry);
struct dentry *umsdos_lookup_x ( struct inode *dir, struct dentry *dentry, int nopseudo);
-struct dentry *UMSDOS_lookup(struct inode *, struct dentry *);
+struct dentry *UMSDOS_lookup(struct inode *, struct dentry *, struct nameidata *);
struct dentry *umsdos_lookup_dentry(struct dentry *, char *, int, int);
struct dentry *umsdos_covered(struct dentry *, char *, int);
@@ -92,7 +92,7 @@ int UMSDOS_rename (struct inode *old_dir,
/* rdir.c 22/03/95 03.31.42 */
struct dentry *umsdos_rlookup_x (struct inode *dir, struct dentry *dentry, int nopseudo);
-struct dentry *UMSDOS_rlookup (struct inode *dir, struct dentry *dentry);
+struct dentry *UMSDOS_rlookup (struct inode *dir, struct dentry *dentry, struct nameidata *nd);
static inline struct umsdos_inode_info *UMSDOS_I(struct inode *inode)
{