aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/Kbuild6
-rw-r--r--include/linux/dcache.h3
-rw-r--r--include/linux/dlm.h7
-rw-r--r--include/linux/dlm_device.h11
-rw-r--r--include/linux/dlm_plock.h50
-rw-r--r--include/linux/dlmconstants.h4
-rw-r--r--include/linux/fs.h6
-rw-r--r--include/linux/hid.h17
-rw-r--r--include/linux/hidraw.h1
-rw-r--r--include/linux/i2c-algo-pca.h37
-rw-r--r--include/linux/i2c-pca-platform.h12
-rw-r--r--include/linux/lock_dlm_plock.h41
-rw-r--r--include/linux/mnt_namespace.h12
-rw-r--r--include/linux/mount.h4
-rw-r--r--include/linux/security.h52
-rw-r--r--include/linux/seq_file.h6
-rw-r--r--include/linux/udf_fs.h51
-rw-r--r--include/linux/udf_fs_i.h31
-rw-r--r--include/linux/udf_fs_sb.h117
19 files changed, 172 insertions, 296 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index b3d9ccde0c27..cbb5ccb27de3 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -100,7 +100,7 @@ header-y += ixjuser.h
100header-y += jffs2.h 100header-y += jffs2.h
101header-y += keyctl.h 101header-y += keyctl.h
102header-y += limits.h 102header-y += limits.h
103header-y += lock_dlm_plock.h 103header-y += dlm_plock.h
104header-y += magic.h 104header-y += magic.h
105header-y += major.h 105header-y += major.h
106header-y += matroxfb.h 106header-y += matroxfb.h
@@ -150,6 +150,7 @@ header-y += tiocl.h
150header-y += tipc.h 150header-y += tipc.h
151header-y += tipc_config.h 151header-y += tipc_config.h
152header-y += toshiba.h 152header-y += toshiba.h
153header-y += udf_fs_i.h
153header-y += ultrasound.h 154header-y += ultrasound.h
154header-y += un.h 155header-y += un.h
155header-y += utime.h 156header-y += utime.h
@@ -210,7 +211,9 @@ unifdef-y += hdlcdrv.h
210unifdef-y += hdlc.h 211unifdef-y += hdlc.h
211unifdef-y += hdreg.h 212unifdef-y += hdreg.h
212unifdef-y += hdsmart.h 213unifdef-y += hdsmart.h
214unifdef-y += hid.h
213unifdef-y += hiddev.h 215unifdef-y += hiddev.h
216unifdef-y += hidraw.h
214unifdef-y += hpet.h 217unifdef-y += hpet.h
215unifdef-y += i2c.h 218unifdef-y += i2c.h
216unifdef-y += i2c-dev.h 219unifdef-y += i2c-dev.h
@@ -334,7 +337,6 @@ unifdef-y += time.h
334unifdef-y += timex.h 337unifdef-y += timex.h
335unifdef-y += tty.h 338unifdef-y += tty.h
336unifdef-y += types.h 339unifdef-y += types.h
337unifdef-y += udf_fs_i.h
338unifdef-y += udp.h 340unifdef-y += udp.h
339unifdef-y += uinput.h 341unifdef-y += uinput.h
340unifdef-y += uio.h 342unifdef-y += uio.h
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 6bd646096fa6..cfb1627ac51c 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -301,7 +301,9 @@ extern int d_validate(struct dentry *, struct dentry *);
301 */ 301 */
302extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); 302extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...);
303 303
304extern char *__d_path(const struct path *path, struct path *root, char *, int);
304extern char *d_path(struct path *, char *, int); 305extern char *d_path(struct path *, char *, int);
306extern char *dentry_path(struct dentry *, char *, int);
305 307
306/* Allocation counts.. */ 308/* Allocation counts.. */
307 309
@@ -359,7 +361,6 @@ static inline int d_mountpoint(struct dentry *dentry)
359} 361}
360 362
361extern struct vfsmount *lookup_mnt(struct vfsmount *, struct dentry *); 363extern struct vfsmount *lookup_mnt(struct vfsmount *, struct dentry *);
362extern struct vfsmount *__lookup_mnt(struct vfsmount *, struct dentry *, int);
363extern struct dentry *lookup_create(struct nameidata *nd, int is_dir); 364extern struct dentry *lookup_create(struct nameidata *nd, int is_dir);
364 365
365extern int sysctl_vfs_cache_pressure; 366extern int sysctl_vfs_cache_pressure;
diff --git a/include/linux/dlm.h b/include/linux/dlm.h
index c743fbc769db..203a025e30e5 100644
--- a/include/linux/dlm.h
+++ b/include/linux/dlm.h
@@ -21,10 +21,7 @@
21 21
22/* Lock levels and flags are here */ 22/* Lock levels and flags are here */
23#include <linux/dlmconstants.h> 23#include <linux/dlmconstants.h>
24 24#include <linux/types.h>
25
26#define DLM_RESNAME_MAXLEN 64
27
28 25
29typedef void dlm_lockspace_t; 26typedef void dlm_lockspace_t;
30 27
@@ -63,7 +60,7 @@ typedef void dlm_lockspace_t;
63 60
64struct dlm_lksb { 61struct dlm_lksb {
65 int sb_status; 62 int sb_status;
66 uint32_t sb_lkid; 63 __u32 sb_lkid;
67 char sb_flags; 64 char sb_flags;
68 char * sb_lvbptr; 65 char * sb_lvbptr;
69}; 66};
diff --git a/include/linux/dlm_device.h b/include/linux/dlm_device.h
index 9642277a152a..c6034508fed9 100644
--- a/include/linux/dlm_device.h
+++ b/include/linux/dlm_device.h
@@ -11,10 +11,16 @@
11******************************************************************************* 11*******************************************************************************
12******************************************************************************/ 12******************************************************************************/
13 13
14#ifndef _LINUX_DLM_DEVICE_H
15#define _LINUX_DLM_DEVICE_H
16
14/* This is the device interface for dlm, most users will use a library 17/* This is the device interface for dlm, most users will use a library
15 * interface. 18 * interface.
16 */ 19 */
17 20
21#include <linux/dlm.h>
22#include <linux/types.h>
23
18#define DLM_USER_LVB_LEN 32 24#define DLM_USER_LVB_LEN 32
19 25
20/* Version of the device interface */ 26/* Version of the device interface */
@@ -94,10 +100,9 @@ struct dlm_lock_result {
94#define DLM_USER_PURGE 6 100#define DLM_USER_PURGE 6
95#define DLM_USER_DEADLOCK 7 101#define DLM_USER_DEADLOCK 7
96 102
97/* Arbitrary length restriction */
98#define MAX_LS_NAME_LEN 64
99
100/* Lockspace flags */ 103/* Lockspace flags */
101#define DLM_USER_LSFLG_AUTOFREE 1 104#define DLM_USER_LSFLG_AUTOFREE 1
102#define DLM_USER_LSFLG_FORCEFREE 2 105#define DLM_USER_LSFLG_FORCEFREE 2
103 106
107#endif
108
diff --git a/include/linux/dlm_plock.h b/include/linux/dlm_plock.h
new file mode 100644
index 000000000000..18d5fdbceb74
--- /dev/null
+++ b/include/linux/dlm_plock.h
@@ -0,0 +1,50 @@
1/*
2 * Copyright (C) 2005-2008 Red Hat, Inc. All rights reserved.
3 *
4 * This copyrighted material is made available to anyone wishing to use,
5 * modify, copy, or redistribute it subject to the terms and conditions
6 * of the GNU General Public License v.2.
7 */
8
9#ifndef __DLM_PLOCK_DOT_H__
10#define __DLM_PLOCK_DOT_H__
11
12#define DLM_PLOCK_MISC_NAME "dlm_plock"
13
14#define DLM_PLOCK_VERSION_MAJOR 1
15#define DLM_PLOCK_VERSION_MINOR 1
16#define DLM_PLOCK_VERSION_PATCH 0
17
18enum {
19 DLM_PLOCK_OP_LOCK = 1,
20 DLM_PLOCK_OP_UNLOCK,
21 DLM_PLOCK_OP_GET,
22};
23
24struct dlm_plock_info {
25 __u32 version[3];
26 __u8 optype;
27 __u8 ex;
28 __u8 wait;
29 __u8 pad;
30 __u32 pid;
31 __s32 nodeid;
32 __s32 rv;
33 __u32 fsid;
34 __u64 number;
35 __u64 start;
36 __u64 end;
37 __u64 owner;
38};
39
40#ifdef __KERNEL__
41int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
42 int cmd, struct file_lock *fl);
43int dlm_posix_unlock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
44 struct file_lock *fl);
45int dlm_posix_get(dlm_lockspace_t *lockspace, u64 number, struct file *file,
46 struct file_lock *fl);
47#endif /* __KERNEL__ */
48
49#endif
50
diff --git a/include/linux/dlmconstants.h b/include/linux/dlmconstants.h
index fddb3d3ff321..47bf08dc7566 100644
--- a/include/linux/dlmconstants.h
+++ b/include/linux/dlmconstants.h
@@ -18,6 +18,10 @@
18 * Constants used by DLM interface. 18 * Constants used by DLM interface.
19 */ 19 */
20 20
21#define DLM_LOCKSPACE_LEN 64
22#define DLM_RESNAME_MAXLEN 64
23
24
21/* 25/*
22 * Lock Modes 26 * Lock Modes
23 */ 27 */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 0c609e71c379..cc2be2cf7d41 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -305,7 +305,6 @@ struct vfsmount;
305 305
306extern void __init inode_init(void); 306extern void __init inode_init(void);
307extern void __init inode_init_early(void); 307extern void __init inode_init_early(void);
308extern void __init mnt_init(void);
309extern void __init files_init(unsigned long); 308extern void __init files_init(unsigned long);
310 309
311struct buffer_head; 310struct buffer_head;
@@ -1536,12 +1535,7 @@ extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data);
1536#define kern_mount(type) kern_mount_data(type, NULL) 1535#define kern_mount(type) kern_mount_data(type, NULL)
1537extern int may_umount_tree(struct vfsmount *); 1536extern int may_umount_tree(struct vfsmount *);
1538extern int may_umount(struct vfsmount *); 1537extern int may_umount(struct vfsmount *);
1539extern void umount_tree(struct vfsmount *, int, struct list_head *);
1540extern void release_mounts(struct list_head *);
1541extern long do_mount(char *, char *, char *, unsigned long, void *); 1538extern long do_mount(char *, char *, char *, unsigned long, void *);
1542extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int);
1543extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *,
1544 struct vfsmount *);
1545extern struct vfsmount *collect_mounts(struct vfsmount *, struct dentry *); 1539extern struct vfsmount *collect_mounts(struct vfsmount *, struct dentry *);
1546extern void drop_collected_mounts(struct vfsmount *); 1540extern void drop_collected_mounts(struct vfsmount *);
1547 1541
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 74ff57596eb1..d951ec411241 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -284,6 +284,7 @@ struct hid_item {
284#define HID_QUIRK_2WHEEL_MOUSE_HACK_B8 0x02000000 284#define HID_QUIRK_2WHEEL_MOUSE_HACK_B8 0x02000000
285#define HID_QUIRK_HWHEEL_WHEEL_INVERT 0x04000000 285#define HID_QUIRK_HWHEEL_WHEEL_INVERT 0x04000000
286#define HID_QUIRK_MICROSOFT_KEYS 0x08000000 286#define HID_QUIRK_MICROSOFT_KEYS 0x08000000
287#define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000
287 288
288/* 289/*
289 * Separate quirks for runtime report descriptor fixup 290 * Separate quirks for runtime report descriptor fixup
@@ -296,6 +297,8 @@ struct hid_item {
296#define HID_QUIRK_RDESC_MACBOOK_JIS 0x00000010 297#define HID_QUIRK_RDESC_MACBOOK_JIS 0x00000010
297#define HID_QUIRK_RDESC_BUTTON_CONSUMER 0x00000020 298#define HID_QUIRK_RDESC_BUTTON_CONSUMER 0x00000020
298#define HID_QUIRK_RDESC_SAMSUNG_REMOTE 0x00000040 299#define HID_QUIRK_RDESC_SAMSUNG_REMOTE 0x00000040
300#define HID_QUIRK_RDESC_MICROSOFT_RECV_1028 0x00000080
301#define HID_QUIRK_RDESC_SUNPLUS_WDESKTOP 0x00000100
299 302
300/* 303/*
301 * This is the global environment of the parser. This information is 304 * This is the global environment of the parser. This information is
@@ -320,7 +323,7 @@ struct hid_global {
320 * This is the local environment. It is persistent up the next main-item. 323 * This is the local environment. It is persistent up the next main-item.
321 */ 324 */
322 325
323#define HID_MAX_USAGES 8192 326#define HID_MAX_USAGES 12288
324#define HID_DEFAULT_NUM_COLLECTIONS 16 327#define HID_DEFAULT_NUM_COLLECTIONS 16
325 328
326struct hid_local { 329struct hid_local {
@@ -421,6 +424,7 @@ struct hid_control_fifo {
421#define HID_RESET_PENDING 4 424#define HID_RESET_PENDING 4
422#define HID_SUSPENDED 5 425#define HID_SUSPENDED 5
423#define HID_CLEAR_HALT 6 426#define HID_CLEAR_HALT 6
427#define HID_DISCONNECTED 7
424 428
425struct hid_input { 429struct hid_input {
426 struct list_head list; 430 struct list_head list;
@@ -452,8 +456,6 @@ struct hid_device { /* device report descriptor */
452 void *hidraw; 456 void *hidraw;
453 int minor; /* Hiddev minor number */ 457 int minor; /* Hiddev minor number */
454 458
455 wait_queue_head_t wait; /* For sleeping */
456
457 int open; /* is the device open by anyone? */ 459 int open; /* is the device open by anyone? */
458 char name[128]; /* Device name */ 460 char name[128]; /* Device name */
459 char phys[64]; /* Device physical location */ 461 char phys[64]; /* Device physical location */
@@ -530,14 +532,12 @@ int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int
530int hidinput_mapping_quirks(struct hid_usage *, struct input_dev *, unsigned long **, int *); 532int hidinput_mapping_quirks(struct hid_usage *, struct input_dev *, unsigned long **, int *);
531int hidinput_event_quirks(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); 533int hidinput_event_quirks(struct hid_device *, struct hid_field *, struct hid_usage *, __s32);
532int hidinput_apple_event(struct hid_device *, struct input_dev *, struct hid_usage *, __s32); 534int hidinput_apple_event(struct hid_device *, struct input_dev *, struct hid_usage *, __s32);
533void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, int interrupt);
534void hid_output_report(struct hid_report *report, __u8 *data); 535void hid_output_report(struct hid_report *report, __u8 *data);
535void hid_free_device(struct hid_device *device); 536void hid_free_device(struct hid_device *device);
536struct hid_device *hid_parse_report(__u8 *start, unsigned size); 537struct hid_device *hid_parse_report(__u8 *start, unsigned size);
537 538
538/* HID quirks API */ 539/* HID quirks API */
539u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct); 540u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct);
540int usbhid_modify_dquirk(const u16 idVendor, const u16 idProduct, const u32 quirks);
541int usbhid_quirks_init(char **quirks_param); 541int usbhid_quirks_init(char **quirks_param);
542void usbhid_quirks_exit(void); 542void usbhid_quirks_exit(void);
543void usbhid_fixup_report_descriptor(const u16, const u16, char *, unsigned, char **); 543void usbhid_fixup_report_descriptor(const u16, const u16, char *, unsigned, char **);
@@ -546,6 +546,7 @@ void usbhid_fixup_report_descriptor(const u16, const u16, char *, unsigned, char
546int hid_ff_init(struct hid_device *hid); 546int hid_ff_init(struct hid_device *hid);
547 547
548int hid_lgff_init(struct hid_device *hid); 548int hid_lgff_init(struct hid_device *hid);
549int hid_lg2ff_init(struct hid_device *hid);
549int hid_plff_init(struct hid_device *hid); 550int hid_plff_init(struct hid_device *hid);
550int hid_tmff_init(struct hid_device *hid); 551int hid_tmff_init(struct hid_device *hid);
551int hid_zpff_init(struct hid_device *hid); 552int hid_zpff_init(struct hid_device *hid);
@@ -566,7 +567,11 @@ static inline int hid_ff_init(struct hid_device *hid) { return -1; }
566#define dbg_hid_line(format, arg...) if (hid_debug) \ 567#define dbg_hid_line(format, arg...) if (hid_debug) \
567 printk(format, ## arg) 568 printk(format, ## arg)
568#else 569#else
569#define dbg_hid(format, arg...) do {} while (0) 570static inline int __attribute__((format(printf, 1, 2)))
571dbg_hid(const char *fmt, ...)
572{
573 return 0;
574}
570#define dbg_hid_line dbg_hid 575#define dbg_hid_line dbg_hid
571#endif 576#endif
572 577
diff --git a/include/linux/hidraw.h b/include/linux/hidraw.h
index 0536f299f7ff..dbb5c8c374f0 100644
--- a/include/linux/hidraw.h
+++ b/include/linux/hidraw.h
@@ -16,6 +16,7 @@
16 */ 16 */
17 17
18#include <linux/hid.h> 18#include <linux/hid.h>
19#include <linux/types.h>
19 20
20struct hidraw_report_descriptor { 21struct hidraw_report_descriptor {
21 __u32 size; 22 __u32 size;
diff --git a/include/linux/i2c-algo-pca.h b/include/linux/i2c-algo-pca.h
index fce47c051bb1..adcb3dc7ac26 100644
--- a/include/linux/i2c-algo-pca.h
+++ b/include/linux/i2c-algo-pca.h
@@ -1,14 +1,41 @@
1#ifndef _LINUX_I2C_ALGO_PCA_H 1#ifndef _LINUX_I2C_ALGO_PCA_H
2#define _LINUX_I2C_ALGO_PCA_H 2#define _LINUX_I2C_ALGO_PCA_H
3 3
4/* Clock speeds for the bus */
5#define I2C_PCA_CON_330kHz 0x00
6#define I2C_PCA_CON_288kHz 0x01
7#define I2C_PCA_CON_217kHz 0x02
8#define I2C_PCA_CON_146kHz 0x03
9#define I2C_PCA_CON_88kHz 0x04
10#define I2C_PCA_CON_59kHz 0x05
11#define I2C_PCA_CON_44kHz 0x06
12#define I2C_PCA_CON_36kHz 0x07
13
14/* PCA9564 registers */
15#define I2C_PCA_STA 0x00 /* STATUS Read Only */
16#define I2C_PCA_TO 0x00 /* TIMEOUT Write Only */
17#define I2C_PCA_DAT 0x01 /* DATA Read/Write */
18#define I2C_PCA_ADR 0x02 /* OWN ADR Read/Write */
19#define I2C_PCA_CON 0x03 /* CONTROL Read/Write */
20
21#define I2C_PCA_CON_AA 0x80 /* Assert Acknowledge */
22#define I2C_PCA_CON_ENSIO 0x40 /* Enable */
23#define I2C_PCA_CON_STA 0x20 /* Start */
24#define I2C_PCA_CON_STO 0x10 /* Stop */
25#define I2C_PCA_CON_SI 0x08 /* Serial Interrupt */
26#define I2C_PCA_CON_CR 0x07 /* Clock Rate (MASK) */
27
4struct i2c_algo_pca_data { 28struct i2c_algo_pca_data {
5 int (*get_own) (struct i2c_algo_pca_data *adap); /* Obtain own address */ 29 void *data; /* private low level data */
6 int (*get_clock) (struct i2c_algo_pca_data *adap); 30 void (*write_byte) (void *data, int reg, int val);
7 void (*write_byte) (struct i2c_algo_pca_data *adap, int reg, int val); 31 int (*read_byte) (void *data, int reg);
8 int (*read_byte) (struct i2c_algo_pca_data *adap, int reg); 32 int (*wait_for_completion) (void *data);
9 int (*wait_for_interrupt) (struct i2c_algo_pca_data *adap); 33 void (*reset_chip) (void *data);
34 /* i2c_clock values are defined in linux/i2c-algo-pca.h */
35 unsigned int i2c_clock;
10}; 36};
11 37
12int i2c_pca_add_bus(struct i2c_adapter *); 38int i2c_pca_add_bus(struct i2c_adapter *);
39int i2c_pca_add_numbered_bus(struct i2c_adapter *);
13 40
14#endif /* _LINUX_I2C_ALGO_PCA_H */ 41#endif /* _LINUX_I2C_ALGO_PCA_H */
diff --git a/include/linux/i2c-pca-platform.h b/include/linux/i2c-pca-platform.h
new file mode 100644
index 000000000000..3d191873f2d1
--- /dev/null
+++ b/include/linux/i2c-pca-platform.h
@@ -0,0 +1,12 @@
1#ifndef I2C_PCA9564_PLATFORM_H
2#define I2C_PCA9564_PLATFORM_H
3
4struct i2c_pca9564_pf_platform_data {
5 int gpio; /* pin to reset chip. driver will work when
6 * not supplied (negative value), but it
7 * cannot exit some error conditions then */
8 int i2c_clock_speed; /* values are defined in linux/i2c-algo-pca.h */
9 int timeout; /* timeout = this value * 10us */
10};
11
12#endif /* I2C_PCA9564_PLATFORM_H */
diff --git a/include/linux/lock_dlm_plock.h b/include/linux/lock_dlm_plock.h
deleted file mode 100644
index fc3415113973..000000000000
--- a/include/linux/lock_dlm_plock.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * Copyright (C) 2005 Red Hat, Inc. All rights reserved.
3 *
4 * This copyrighted material is made available to anyone wishing to use,
5 * modify, copy, or redistribute it subject to the terms and conditions
6 * of the GNU General Public License v.2.
7 */
8
9#ifndef __LOCK_DLM_PLOCK_DOT_H__
10#define __LOCK_DLM_PLOCK_DOT_H__
11
12#define GDLM_PLOCK_MISC_NAME "lock_dlm_plock"
13
14#define GDLM_PLOCK_VERSION_MAJOR 1
15#define GDLM_PLOCK_VERSION_MINOR 1
16#define GDLM_PLOCK_VERSION_PATCH 0
17
18enum {
19 GDLM_PLOCK_OP_LOCK = 1,
20 GDLM_PLOCK_OP_UNLOCK,
21 GDLM_PLOCK_OP_GET,
22};
23
24struct gdlm_plock_info {
25 __u32 version[3];
26 __u8 optype;
27 __u8 ex;
28 __u8 wait;
29 __u8 pad;
30 __u32 pid;
31 __s32 nodeid;
32 __s32 rv;
33 __u32 fsid;
34 __u64 number;
35 __u64 start;
36 __u64 end;
37 __u64 owner;
38};
39
40#endif
41
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h
index 8eed44f8ca73..830bbcd449d6 100644
--- a/include/linux/mnt_namespace.h
+++ b/include/linux/mnt_namespace.h
@@ -5,6 +5,7 @@
5#include <linux/mount.h> 5#include <linux/mount.h>
6#include <linux/sched.h> 6#include <linux/sched.h>
7#include <linux/nsproxy.h> 7#include <linux/nsproxy.h>
8#include <linux/seq_file.h>
8 9
9struct mnt_namespace { 10struct mnt_namespace {
10 atomic_t count; 11 atomic_t count;
@@ -14,6 +15,13 @@ struct mnt_namespace {
14 int event; 15 int event;
15}; 16};
16 17
18struct proc_mounts {
19 struct seq_file m; /* must be the first element */
20 struct mnt_namespace *ns;
21 struct path root;
22 int event;
23};
24
17extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, 25extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
18 struct fs_struct *); 26 struct fs_struct *);
19extern void __put_mnt_ns(struct mnt_namespace *ns); 27extern void __put_mnt_ns(struct mnt_namespace *ns);
@@ -37,5 +45,9 @@ static inline void get_mnt_ns(struct mnt_namespace *ns)
37 atomic_inc(&ns->count); 45 atomic_inc(&ns->count);
38} 46}
39 47
48extern const struct seq_operations mounts_op;
49extern const struct seq_operations mountinfo_op;
50extern const struct seq_operations mountstats_op;
51
40#endif 52#endif
41#endif 53#endif
diff --git a/include/linux/mount.h b/include/linux/mount.h
index d6600e3f7e45..b4836d58f428 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -56,6 +56,8 @@ struct vfsmount {
56 struct list_head mnt_slave; /* slave list entry */ 56 struct list_head mnt_slave; /* slave list entry */
57 struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ 57 struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */
58 struct mnt_namespace *mnt_ns; /* containing namespace */ 58 struct mnt_namespace *mnt_ns; /* containing namespace */
59 int mnt_id; /* mount identifier */
60 int mnt_group_id; /* peer group identifier */
59 /* 61 /*
60 * We put mnt_count & mnt_expiry_mark at the end of struct vfsmount 62 * We put mnt_count & mnt_expiry_mark at the end of struct vfsmount
61 * to let these frequently modified fields in a separate cache line 63 * to let these frequently modified fields in a separate cache line
@@ -94,8 +96,6 @@ static inline void mntput(struct vfsmount *mnt)
94 } 96 }
95} 97}
96 98
97extern void free_vfsmnt(struct vfsmount *mnt);
98extern struct vfsmount *alloc_vfsmnt(const char *name);
99extern struct vfsmount *do_kern_mount(const char *fstype, int flags, 99extern struct vfsmount *do_kern_mount(const char *fstype, int flags,
100 const char *name, void *data); 100 const char *name, void *data);
101 101
diff --git a/include/linux/security.h b/include/linux/security.h
index fea1f4aa4dd5..53a34539382a 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -230,7 +230,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
230 * loopback/bind mount (@flags & MS_BIND), @dev_name identifies the 230 * loopback/bind mount (@flags & MS_BIND), @dev_name identifies the
231 * pathname of the object being mounted. 231 * pathname of the object being mounted.
232 * @dev_name contains the name for object being mounted. 232 * @dev_name contains the name for object being mounted.
233 * @nd contains the nameidata structure for mount point object. 233 * @path contains the path for mount point object.
234 * @type contains the filesystem type. 234 * @type contains the filesystem type.
235 * @flags contains the mount flags. 235 * @flags contains the mount flags.
236 * @data contains the filesystem-specific data. 236 * @data contains the filesystem-specific data.
@@ -249,7 +249,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
249 * Check permission before the device with superblock @mnt->sb is mounted 249 * Check permission before the device with superblock @mnt->sb is mounted
250 * on the mount point named by @nd. 250 * on the mount point named by @nd.
251 * @mnt contains the vfsmount for device being mounted. 251 * @mnt contains the vfsmount for device being mounted.
252 * @nd contains the nameidata object for the mount point. 252 * @path contains the path for the mount point.
253 * Return 0 if permission is granted. 253 * Return 0 if permission is granted.
254 * @sb_umount: 254 * @sb_umount:
255 * Check permission before the @mnt file system is unmounted. 255 * Check permission before the @mnt file system is unmounted.
@@ -278,16 +278,16 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
278 * This hook is called any time a mount is successfully grafetd to 278 * This hook is called any time a mount is successfully grafetd to
279 * the tree. 279 * the tree.
280 * @mnt contains the mounted filesystem. 280 * @mnt contains the mounted filesystem.
281 * @mountpoint_nd contains the nameidata structure for the mount point. 281 * @mountpoint contains the path for the mount point.
282 * @sb_pivotroot: 282 * @sb_pivotroot:
283 * Check permission before pivoting the root filesystem. 283 * Check permission before pivoting the root filesystem.
284 * @old_nd contains the nameidata structure for the new location of the current root (put_old). 284 * @old_path contains the path for the new location of the current root (put_old).
285 * @new_nd contains the nameidata structure for the new root (new_root). 285 * @new_path contains the path for the new root (new_root).
286 * Return 0 if permission is granted. 286 * Return 0 if permission is granted.
287 * @sb_post_pivotroot: 287 * @sb_post_pivotroot:
288 * Update module state after a successful pivot. 288 * Update module state after a successful pivot.
289 * @old_nd contains the nameidata structure for the old root. 289 * @old_path contains the path for the old root.
290 * @new_nd contains the nameidata structure for the new root. 290 * @new_path contains the path for the new root.
291 * @sb_get_mnt_opts: 291 * @sb_get_mnt_opts:
292 * Get the security relevant mount options used for a superblock 292 * Get the security relevant mount options used for a superblock
293 * @sb the superblock to get security mount options from 293 * @sb the superblock to get security mount options from
@@ -1315,20 +1315,20 @@ struct security_operations {
1315 int (*sb_copy_data)(char *orig, char *copy); 1315 int (*sb_copy_data)(char *orig, char *copy);
1316 int (*sb_kern_mount) (struct super_block *sb, void *data); 1316 int (*sb_kern_mount) (struct super_block *sb, void *data);
1317 int (*sb_statfs) (struct dentry *dentry); 1317 int (*sb_statfs) (struct dentry *dentry);
1318 int (*sb_mount) (char *dev_name, struct nameidata * nd, 1318 int (*sb_mount) (char *dev_name, struct path *path,
1319 char *type, unsigned long flags, void *data); 1319 char *type, unsigned long flags, void *data);
1320 int (*sb_check_sb) (struct vfsmount * mnt, struct nameidata * nd); 1320 int (*sb_check_sb) (struct vfsmount * mnt, struct path *path);
1321 int (*sb_umount) (struct vfsmount * mnt, int flags); 1321 int (*sb_umount) (struct vfsmount * mnt, int flags);
1322 void (*sb_umount_close) (struct vfsmount * mnt); 1322 void (*sb_umount_close) (struct vfsmount * mnt);
1323 void (*sb_umount_busy) (struct vfsmount * mnt); 1323 void (*sb_umount_busy) (struct vfsmount * mnt);
1324 void (*sb_post_remount) (struct vfsmount * mnt, 1324 void (*sb_post_remount) (struct vfsmount * mnt,
1325 unsigned long flags, void *data); 1325 unsigned long flags, void *data);
1326 void (*sb_post_addmount) (struct vfsmount * mnt, 1326 void (*sb_post_addmount) (struct vfsmount * mnt,
1327 struct nameidata * mountpoint_nd); 1327 struct path *mountpoint);
1328 int (*sb_pivotroot) (struct nameidata * old_nd, 1328 int (*sb_pivotroot) (struct path *old_path,
1329 struct nameidata * new_nd); 1329 struct path *new_path);
1330 void (*sb_post_pivotroot) (struct nameidata * old_nd, 1330 void (*sb_post_pivotroot) (struct path *old_path,
1331 struct nameidata * new_nd); 1331 struct path *new_path);
1332 int (*sb_get_mnt_opts) (const struct super_block *sb, 1332 int (*sb_get_mnt_opts) (const struct super_block *sb,
1333 struct security_mnt_opts *opts); 1333 struct security_mnt_opts *opts);
1334 int (*sb_set_mnt_opts) (struct super_block *sb, 1334 int (*sb_set_mnt_opts) (struct super_block *sb,
@@ -1593,16 +1593,16 @@ void security_sb_free(struct super_block *sb);
1593int security_sb_copy_data(char *orig, char *copy); 1593int security_sb_copy_data(char *orig, char *copy);
1594int security_sb_kern_mount(struct super_block *sb, void *data); 1594int security_sb_kern_mount(struct super_block *sb, void *data);
1595int security_sb_statfs(struct dentry *dentry); 1595int security_sb_statfs(struct dentry *dentry);
1596int security_sb_mount(char *dev_name, struct nameidata *nd, 1596int security_sb_mount(char *dev_name, struct path *path,
1597 char *type, unsigned long flags, void *data); 1597 char *type, unsigned long flags, void *data);
1598int security_sb_check_sb(struct vfsmount *mnt, struct nameidata *nd); 1598int security_sb_check_sb(struct vfsmount *mnt, struct path *path);
1599int security_sb_umount(struct vfsmount *mnt, int flags); 1599int security_sb_umount(struct vfsmount *mnt, int flags);
1600void security_sb_umount_close(struct vfsmount *mnt); 1600void security_sb_umount_close(struct vfsmount *mnt);
1601void security_sb_umount_busy(struct vfsmount *mnt); 1601void security_sb_umount_busy(struct vfsmount *mnt);
1602void security_sb_post_remount(struct vfsmount *mnt, unsigned long flags, void *data); 1602void security_sb_post_remount(struct vfsmount *mnt, unsigned long flags, void *data);
1603void security_sb_post_addmount(struct vfsmount *mnt, struct nameidata *mountpoint_nd); 1603void security_sb_post_addmount(struct vfsmount *mnt, struct path *mountpoint);
1604int security_sb_pivotroot(struct nameidata *old_nd, struct nameidata *new_nd); 1604int security_sb_pivotroot(struct path *old_path, struct path *new_path);
1605void security_sb_post_pivotroot(struct nameidata *old_nd, struct nameidata *new_nd); 1605void security_sb_post_pivotroot(struct path *old_path, struct path *new_path);
1606int security_sb_get_mnt_opts(const struct super_block *sb, 1606int security_sb_get_mnt_opts(const struct super_block *sb,
1607 struct security_mnt_opts *opts); 1607 struct security_mnt_opts *opts);
1608int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); 1608int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts);
@@ -1872,7 +1872,7 @@ static inline int security_sb_statfs (struct dentry *dentry)
1872 return 0; 1872 return 0;
1873} 1873}
1874 1874
1875static inline int security_sb_mount (char *dev_name, struct nameidata *nd, 1875static inline int security_sb_mount (char *dev_name, struct path *path,
1876 char *type, unsigned long flags, 1876 char *type, unsigned long flags,
1877 void *data) 1877 void *data)
1878{ 1878{
@@ -1880,7 +1880,7 @@ static inline int security_sb_mount (char *dev_name, struct nameidata *nd,
1880} 1880}
1881 1881
1882static inline int security_sb_check_sb (struct vfsmount *mnt, 1882static inline int security_sb_check_sb (struct vfsmount *mnt,
1883 struct nameidata *nd) 1883 struct path *path)
1884{ 1884{
1885 return 0; 1885 return 0;
1886} 1886}
@@ -1901,17 +1901,17 @@ static inline void security_sb_post_remount (struct vfsmount *mnt,
1901{ } 1901{ }
1902 1902
1903static inline void security_sb_post_addmount (struct vfsmount *mnt, 1903static inline void security_sb_post_addmount (struct vfsmount *mnt,
1904 struct nameidata *mountpoint_nd) 1904 struct path *mountpoint)
1905{ } 1905{ }
1906 1906
1907static inline int security_sb_pivotroot (struct nameidata *old_nd, 1907static inline int security_sb_pivotroot (struct path *old_path,
1908 struct nameidata *new_nd) 1908 struct path *new_path)
1909{ 1909{
1910 return 0; 1910 return 0;
1911} 1911}
1912 1912
1913static inline void security_sb_post_pivotroot (struct nameidata *old_nd, 1913static inline void security_sb_post_pivotroot (struct path *old_path,
1914 struct nameidata *new_nd) 1914 struct path *new_path)
1915{ } 1915{ }
1916static inline int security_sb_get_mnt_opts(const struct super_block *sb, 1916static inline int security_sb_get_mnt_opts(const struct super_block *sb,
1917 struct security_mnt_opts *opts) 1917 struct security_mnt_opts *opts)
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index 1da1e6208a0a..5b5369c3c209 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -10,6 +10,7 @@ struct seq_operations;
10struct file; 10struct file;
11struct path; 11struct path;
12struct inode; 12struct inode;
13struct dentry;
13 14
14struct seq_file { 15struct seq_file {
15 char *buf; 16 char *buf;
@@ -30,6 +31,8 @@ struct seq_operations {
30 int (*show) (struct seq_file *m, void *v); 31 int (*show) (struct seq_file *m, void *v);
31}; 32};
32 33
34#define SEQ_SKIP 1
35
33int seq_open(struct file *, const struct seq_operations *); 36int seq_open(struct file *, const struct seq_operations *);
34ssize_t seq_read(struct file *, char __user *, size_t, loff_t *); 37ssize_t seq_read(struct file *, char __user *, size_t, loff_t *);
35loff_t seq_lseek(struct file *, loff_t, int); 38loff_t seq_lseek(struct file *, loff_t, int);
@@ -42,6 +45,9 @@ int seq_printf(struct seq_file *, const char *, ...)
42 __attribute__ ((format (printf,2,3))); 45 __attribute__ ((format (printf,2,3)));
43 46
44int seq_path(struct seq_file *, struct path *, char *); 47int seq_path(struct seq_file *, struct path *, char *);
48int seq_dentry(struct seq_file *, struct dentry *, char *);
49int seq_path_root(struct seq_file *m, struct path *path, struct path *root,
50 char *esc);
45 51
46int single_open(struct file *, int (*)(struct seq_file *, void *), void *); 52int single_open(struct file *, int (*)(struct seq_file *, void *), void *);
47int single_release(struct inode *, struct file *); 53int single_release(struct inode *, struct file *);
diff --git a/include/linux/udf_fs.h b/include/linux/udf_fs.h
deleted file mode 100644
index aa88654eb76b..000000000000
--- a/include/linux/udf_fs.h
+++ /dev/null
@@ -1,51 +0,0 @@
1/*
2 * udf_fs.h
3 *
4 * PURPOSE
5 * Included by fs/filesystems.c
6 *
7 * DESCRIPTION
8 * OSTA-UDF(tm) = Optical Storage Technology Association
9 * Universal Disk Format.
10 *
11 * This code is based on version 2.50 of the UDF specification,
12 * and revision 3 of the ECMA 167 standard [equivalent to ISO 13346].
13 * http://www.osta.org/ * http://www.ecma.ch/
14 * http://www.iso.org/
15 *
16 * COPYRIGHT
17 * This file is distributed under the terms of the GNU General Public
18 * License (GPL). Copies of the GPL can be obtained from:
19 * ftp://prep.ai.mit.edu/pub/gnu/GPL
20 * Each contributing author retains all rights to their own work.
21 *
22 * (C) 1999-2004 Ben Fennema
23 * (C) 1999-2000 Stelias Computing Inc
24 *
25 * HISTORY
26 *
27 */
28
29#ifndef _UDF_FS_H
30#define _UDF_FS_H 1
31
32#define UDF_PREALLOCATE
33#define UDF_DEFAULT_PREALLOC_BLOCKS 8
34
35#undef UDFFS_DEBUG
36
37#ifdef UDFFS_DEBUG
38#define udf_debug(f, a...) \
39 do { \
40 printk (KERN_DEBUG "UDF-fs DEBUG %s:%d:%s: ", \
41 __FILE__, __LINE__, __FUNCTION__); \
42 printk (f, ##a); \
43 } while (0)
44#else
45#define udf_debug(f, a...) /**/
46#endif
47
48#define udf_info(f, a...) \
49 printk (KERN_INFO "UDF-fs INFO " f, ##a);
50
51#endif /* _UDF_FS_H */
diff --git a/include/linux/udf_fs_i.h b/include/linux/udf_fs_i.h
index ffaf05679ffb..3536965913b0 100644
--- a/include/linux/udf_fs_i.h
+++ b/include/linux/udf_fs_i.h
@@ -9,41 +9,10 @@
9 * ftp://prep.ai.mit.edu/pub/gnu/GPL 9 * ftp://prep.ai.mit.edu/pub/gnu/GPL
10 * Each contributing author retains all rights to their own work. 10 * Each contributing author retains all rights to their own work.
11 */ 11 */
12
13#ifndef _UDF_FS_I_H 12#ifndef _UDF_FS_I_H
14#define _UDF_FS_I_H 1 13#define _UDF_FS_I_H 1
15 14
16#ifdef __KERNEL__
17
18struct udf_inode_info
19{
20 struct timespec i_crtime;
21 /* Physical address of inode */
22 kernel_lb_addr i_location;
23 __u64 i_unique;
24 __u32 i_lenEAttr;
25 __u32 i_lenAlloc;
26 __u64 i_lenExtents;
27 __u32 i_next_alloc_block;
28 __u32 i_next_alloc_goal;
29 unsigned i_alloc_type : 3;
30 unsigned i_efe : 1;
31 unsigned i_use : 1;
32 unsigned i_strat4096 : 1;
33 unsigned reserved : 26;
34 union
35 {
36 short_ad *i_sad;
37 long_ad *i_lad;
38 __u8 *i_data;
39 } i_ext;
40 struct inode vfs_inode;
41};
42
43#endif
44
45/* exported IOCTLs, we have 'l', 0x40-0x7f */ 15/* exported IOCTLs, we have 'l', 0x40-0x7f */
46
47#define UDF_GETEASIZE _IOR('l', 0x40, int) 16#define UDF_GETEASIZE _IOR('l', 0x40, int)
48#define UDF_GETEABLOCK _IOR('l', 0x41, void *) 17#define UDF_GETEABLOCK _IOR('l', 0x41, void *)
49#define UDF_GETVOLIDENT _IOR('l', 0x42, void *) 18#define UDF_GETVOLIDENT _IOR('l', 0x42, void *)
diff --git a/include/linux/udf_fs_sb.h b/include/linux/udf_fs_sb.h
deleted file mode 100644
index 9bc47352b6b4..000000000000
--- a/include/linux/udf_fs_sb.h
+++ /dev/null
@@ -1,117 +0,0 @@
1/*
2 * udf_fs_sb.h
3 *
4 * This include file is for the Linux kernel/module.
5 *
6 * COPYRIGHT
7 * This file is distributed under the terms of the GNU General Public
8 * License (GPL). Copies of the GPL can be obtained from:
9 * ftp://prep.ai.mit.edu/pub/gnu/GPL
10 * Each contributing author retains all rights to their own work.
11 */
12
13#ifndef _UDF_FS_SB_H
14#define _UDF_FS_SB_H 1
15
16#include <linux/mutex.h>
17
18#pragma pack(1)
19
20#define UDF_MAX_BLOCK_LOADED 8
21
22#define UDF_TYPE1_MAP15 0x1511U
23#define UDF_VIRTUAL_MAP15 0x1512U
24#define UDF_VIRTUAL_MAP20 0x2012U
25#define UDF_SPARABLE_MAP15 0x1522U
26
27struct udf_sparing_data
28{
29 __u16 s_packet_len;
30 struct buffer_head *s_spar_map[4];
31};
32
33struct udf_virtual_data
34{
35 __u32 s_num_entries;
36 __u16 s_start_offset;
37};
38
39struct udf_bitmap
40{
41 __u32 s_extLength;
42 __u32 s_extPosition;
43 __u16 s_nr_groups;
44 struct buffer_head **s_block_bitmap;
45};
46
47struct udf_part_map
48{
49 union
50 {
51 struct udf_bitmap *s_bitmap;
52 struct inode *s_table;
53 } s_uspace;
54 union
55 {
56 struct udf_bitmap *s_bitmap;
57 struct inode *s_table;
58 } s_fspace;
59 __u32 s_partition_root;
60 __u32 s_partition_len;
61 __u16 s_partition_type;
62 __u16 s_partition_num;
63 union
64 {
65 struct udf_sparing_data s_sparing;
66 struct udf_virtual_data s_virtual;
67 } s_type_specific;
68 __u32 (*s_partition_func)(struct super_block *, __u32, __u16, __u32);
69 __u16 s_volumeseqnum;
70 __u16 s_partition_flags;
71};
72
73#pragma pack()
74
75struct udf_sb_info
76{
77 struct udf_part_map *s_partmaps;
78 __u8 s_volume_ident[32];
79
80 /* Overall info */
81 __u16 s_partitions;
82 __u16 s_partition;
83
84 /* Sector headers */
85 __s32 s_session;
86 __u32 s_anchor[4];
87 __u32 s_last_block;
88
89 struct buffer_head *s_lvid_bh;
90
91 /* Default permissions */
92 mode_t s_umask;
93 gid_t s_gid;
94 uid_t s_uid;
95
96 /* Root Info */
97 struct timespec s_record_time;
98
99 /* Fileset Info */
100 __u16 s_serial_number;
101
102 /* highest UDF revision we have recorded to this media */
103 __u16 s_udfrev;
104
105 /* Miscellaneous flags */
106 __u32 s_flags;
107
108 /* Encoding info */
109 struct nls_table *s_nls_map;
110
111 /* VAT inode */
112 struct inode *s_vat_inode;
113
114 struct mutex s_alloc_mutex;
115};
116
117#endif /* _UDF_FS_SB_H */