diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 195a8cb2a749..e2170ee21e18 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -21,7 +21,6 @@ | |||
21 | 21 | ||
22 | /* Fixed constants first: */ | 22 | /* Fixed constants first: */ |
23 | #undef NR_OPEN | 23 | #undef NR_OPEN |
24 | extern int sysctl_nr_open; | ||
25 | #define INR_OPEN 1024 /* Initial setting for nfile rlimits */ | 24 | #define INR_OPEN 1024 /* Initial setting for nfile rlimits */ |
26 | 25 | ||
27 | #define BLOCK_SIZE_BITS 10 | 26 | #define BLOCK_SIZE_BITS 10 |
@@ -38,21 +37,13 @@ struct files_stat_struct { | |||
38 | int nr_free_files; /* read only */ | 37 | int nr_free_files; /* read only */ |
39 | int max_files; /* tunable */ | 38 | int max_files; /* tunable */ |
40 | }; | 39 | }; |
41 | extern struct files_stat_struct files_stat; | ||
42 | extern int get_max_files(void); | ||
43 | 40 | ||
44 | struct inodes_stat_t { | 41 | struct inodes_stat_t { |
45 | int nr_inodes; | 42 | int nr_inodes; |
46 | int nr_unused; | 43 | int nr_unused; |
47 | int dummy[5]; /* padding for sysctl ABI compatibility */ | 44 | int dummy[5]; /* padding for sysctl ABI compatibility */ |
48 | }; | 45 | }; |
49 | extern struct inodes_stat_t inodes_stat; | ||
50 | 46 | ||
51 | extern int leases_enable, lease_break_time; | ||
52 | |||
53 | #ifdef CONFIG_DNOTIFY | ||
54 | extern int dir_notify_enable; | ||
55 | #endif | ||
56 | 47 | ||
57 | #define NR_FILE 8192 /* this can well be larger on a larger system */ | 48 | #define NR_FILE 8192 /* this can well be larger on a larger system */ |
58 | 49 | ||
@@ -82,6 +73,14 @@ extern int dir_notify_enable; | |||
82 | (specialy hack for floppy.c) */ | 73 | (specialy hack for floppy.c) */ |
83 | #define FMODE_WRITE_IOCTL ((__force fmode_t)128) | 74 | #define FMODE_WRITE_IOCTL ((__force fmode_t)128) |
84 | 75 | ||
76 | /* | ||
77 | * Don't update ctime and mtime. | ||
78 | * | ||
79 | * Currently a special hack for the XFS open_by_handle ioctl, but we'll | ||
80 | * hopefully graduate it to a proper O_CMTIME flag supported by open(2) soon. | ||
81 | */ | ||
82 | #define FMODE_NOCMTIME ((__force fmode_t)2048) | ||
83 | |||
85 | #define RW_MASK 1 | 84 | #define RW_MASK 1 |
86 | #define RWA_MASK 2 | 85 | #define RWA_MASK 2 |
87 | #define READ 0 | 86 | #define READ 0 |
@@ -322,6 +321,15 @@ extern void __init inode_init(void); | |||
322 | extern void __init inode_init_early(void); | 321 | extern void __init inode_init_early(void); |
323 | extern void __init files_init(unsigned long); | 322 | extern void __init files_init(unsigned long); |
324 | 323 | ||
324 | extern struct files_stat_struct files_stat; | ||
325 | extern int get_max_files(void); | ||
326 | extern int sysctl_nr_open; | ||
327 | extern struct inodes_stat_t inodes_stat; | ||
328 | extern int leases_enable, lease_break_time; | ||
329 | #ifdef CONFIG_DNOTIFY | ||
330 | extern int dir_notify_enable; | ||
331 | #endif | ||
332 | |||
325 | struct buffer_head; | 333 | struct buffer_head; |
326 | typedef int (get_block_t)(struct inode *inode, sector_t iblock, | 334 | typedef int (get_block_t)(struct inode *inode, sector_t iblock, |
327 | struct buffer_head *bh_result, int create); | 335 | struct buffer_head *bh_result, int create); |
@@ -1204,7 +1212,6 @@ extern void unlock_super(struct super_block *); | |||
1204 | /* | 1212 | /* |
1205 | * VFS helper functions.. | 1213 | * VFS helper functions.. |
1206 | */ | 1214 | */ |
1207 | extern int vfs_permission(struct nameidata *, int); | ||
1208 | extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *); | 1215 | extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *); |
1209 | extern int vfs_mkdir(struct inode *, struct dentry *, int); | 1216 | extern int vfs_mkdir(struct inode *, struct dentry *, int); |
1210 | extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); | 1217 | extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); |
@@ -1302,7 +1309,6 @@ struct file_operations { | |||
1302 | ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); | 1309 | ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); |
1303 | unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); | 1310 | unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); |
1304 | int (*check_flags)(int); | 1311 | int (*check_flags)(int); |
1305 | int (*dir_notify)(struct file *filp, unsigned long arg); | ||
1306 | int (*flock) (struct file *, int, struct file_lock *); | 1312 | int (*flock) (struct file *, int, struct file_lock *); |
1307 | ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); | 1313 | ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); |
1308 | ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); | 1314 | ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); |
@@ -1861,7 +1867,7 @@ extern void free_write_pipe(struct file *); | |||
1861 | 1867 | ||
1862 | extern struct file *do_filp_open(int dfd, const char *pathname, | 1868 | extern struct file *do_filp_open(int dfd, const char *pathname, |
1863 | int open_flag, int mode); | 1869 | int open_flag, int mode); |
1864 | extern int may_open(struct nameidata *, int, int); | 1870 | extern int may_open(struct path *, int, int); |
1865 | 1871 | ||
1866 | extern int kernel_read(struct file *, unsigned long, char *, unsigned long); | 1872 | extern int kernel_read(struct file *, unsigned long, char *, unsigned long); |
1867 | extern struct file * open_exec(const char *); | 1873 | extern struct file * open_exec(const char *); |
@@ -1877,7 +1883,9 @@ extern loff_t default_llseek(struct file *file, loff_t offset, int origin); | |||
1877 | 1883 | ||
1878 | extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin); | 1884 | extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin); |
1879 | 1885 | ||
1886 | extern struct inode * inode_init_always(struct super_block *, struct inode *); | ||
1880 | extern void inode_init_once(struct inode *); | 1887 | extern void inode_init_once(struct inode *); |
1888 | extern void inode_add_to_lists(struct super_block *, struct inode *); | ||
1881 | extern void iput(struct inode *); | 1889 | extern void iput(struct inode *); |
1882 | extern struct inode * igrab(struct inode *); | 1890 | extern struct inode * igrab(struct inode *); |
1883 | extern ino_t iunique(struct super_block *, ino_t); | 1891 | extern ino_t iunique(struct super_block *, ino_t); |
@@ -1894,6 +1902,8 @@ extern struct inode *ilookup(struct super_block *sb, unsigned long ino); | |||
1894 | 1902 | ||
1895 | extern struct inode * iget5_locked(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *); | 1903 | extern struct inode * iget5_locked(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *); |
1896 | extern struct inode * iget_locked(struct super_block *, unsigned long); | 1904 | extern struct inode * iget_locked(struct super_block *, unsigned long); |
1905 | extern int insert_inode_locked4(struct inode *, unsigned long, int (*test)(struct inode *, void *), void *); | ||
1906 | extern int insert_inode_locked(struct inode *); | ||
1897 | extern void unlock_new_inode(struct inode *); | 1907 | extern void unlock_new_inode(struct inode *); |
1898 | 1908 | ||
1899 | extern void __iget(struct inode * inode); | 1909 | extern void __iget(struct inode * inode); |