diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 20:58:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 20:58:44 -0400 |
commit | 426e1f5cec4821945642230218876b0e89aafab1 (patch) | |
tree | 2728ace018d0698886989da586210ef1543a7098 /include | |
parent | 9e5fca251f44832cb996961048ea977f80faf6ea (diff) | |
parent | 63997e98a3be68d7cec806d22bf9b02b2e1daabb (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (52 commits)
split invalidate_inodes()
fs: skip I_FREEING inodes in writeback_sb_inodes
fs: fold invalidate_list into invalidate_inodes
fs: do not drop inode_lock in dispose_list
fs: inode split IO and LRU lists
fs: switch bdev inode bdi's correctly
fs: fix buffer invalidation in invalidate_list
fsnotify: use dget_parent
smbfs: use dget_parent
exportfs: use dget_parent
fs: use RCU read side protection in d_validate
fs: clean up dentry lru modification
fs: split __shrink_dcache_sb
fs: improve DCACHE_REFERENCED usage
fs: use percpu counter for nr_dentry and nr_dentry_unused
fs: simplify __d_free
fs: take dcache_lock inside __d_path
fs: do not assign default i_ino in new_inode
fs: introduce a per-cpu last_ino allocator
new helper: ihold()
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/buffer_head.h | 1 | ||||
-rw-r--r-- | include/linux/fs.h | 39 | ||||
-rw-r--r-- | include/linux/list.h | 6 | ||||
-rw-r--r-- | include/linux/reiserfs_fs.h | 2 | ||||
-rw-r--r-- | include/linux/writeback.h | 2 |
5 files changed, 35 insertions, 15 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index dd1b25b2641c..68d1fe7b877c 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -212,7 +212,6 @@ int generic_write_end(struct file *, struct address_space *, | |||
212 | loff_t, unsigned, unsigned, | 212 | loff_t, unsigned, unsigned, |
213 | struct page *, void *); | 213 | struct page *, void *); |
214 | void page_zero_new_buffers(struct page *page, unsigned from, unsigned to); | 214 | void page_zero_new_buffers(struct page *page, unsigned from, unsigned to); |
215 | int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*); | ||
216 | int cont_write_begin(struct file *, struct address_space *, loff_t, | 215 | int cont_write_begin(struct file *, struct address_space *, loff_t, |
217 | unsigned, unsigned, struct page **, void **, | 216 | unsigned, unsigned, struct page **, void **, |
218 | get_block_t *, loff_t *); | 217 | get_block_t *, loff_t *); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 4658777b41cc..240eb1d4f876 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -92,6 +92,9 @@ struct inodes_stat_t { | |||
92 | /* Expect random access pattern */ | 92 | /* Expect random access pattern */ |
93 | #define FMODE_RANDOM ((__force fmode_t)0x1000) | 93 | #define FMODE_RANDOM ((__force fmode_t)0x1000) |
94 | 94 | ||
95 | /* File is huge (eg. /dev/kmem): treat loff_t as unsigned */ | ||
96 | #define FMODE_UNSIGNED_OFFSET ((__force fmode_t)0x2000) | ||
97 | |||
95 | /* File was opened by fanotify and shouldn't generate fanotify events */ | 98 | /* File was opened by fanotify and shouldn't generate fanotify events */ |
96 | #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) | 99 | #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) |
97 | 100 | ||
@@ -722,7 +725,8 @@ struct posix_acl; | |||
722 | 725 | ||
723 | struct inode { | 726 | struct inode { |
724 | struct hlist_node i_hash; | 727 | struct hlist_node i_hash; |
725 | struct list_head i_list; /* backing dev IO list */ | 728 | struct list_head i_wb_list; /* backing dev IO list */ |
729 | struct list_head i_lru; /* inode LRU list */ | ||
726 | struct list_head i_sb_list; | 730 | struct list_head i_sb_list; |
727 | struct list_head i_dentry; | 731 | struct list_head i_dentry; |
728 | unsigned long i_ino; | 732 | unsigned long i_ino; |
@@ -789,6 +793,11 @@ struct inode { | |||
789 | void *i_private; /* fs or device private pointer */ | 793 | void *i_private; /* fs or device private pointer */ |
790 | }; | 794 | }; |
791 | 795 | ||
796 | static inline int inode_unhashed(struct inode *inode) | ||
797 | { | ||
798 | return hlist_unhashed(&inode->i_hash); | ||
799 | } | ||
800 | |||
792 | /* | 801 | /* |
793 | * inode->i_mutex nesting subclasses for the lock validator: | 802 | * inode->i_mutex nesting subclasses for the lock validator: |
794 | * | 803 | * |
@@ -1639,16 +1648,17 @@ struct super_operations { | |||
1639 | * | 1648 | * |
1640 | * Q: What is the difference between I_WILL_FREE and I_FREEING? | 1649 | * Q: What is the difference between I_WILL_FREE and I_FREEING? |
1641 | */ | 1650 | */ |
1642 | #define I_DIRTY_SYNC 1 | 1651 | #define I_DIRTY_SYNC (1 << 0) |
1643 | #define I_DIRTY_DATASYNC 2 | 1652 | #define I_DIRTY_DATASYNC (1 << 1) |
1644 | #define I_DIRTY_PAGES 4 | 1653 | #define I_DIRTY_PAGES (1 << 2) |
1645 | #define __I_NEW 3 | 1654 | #define __I_NEW 3 |
1646 | #define I_NEW (1 << __I_NEW) | 1655 | #define I_NEW (1 << __I_NEW) |
1647 | #define I_WILL_FREE 16 | 1656 | #define I_WILL_FREE (1 << 4) |
1648 | #define I_FREEING 32 | 1657 | #define I_FREEING (1 << 5) |
1649 | #define I_CLEAR 64 | 1658 | #define I_CLEAR (1 << 6) |
1650 | #define __I_SYNC 7 | 1659 | #define __I_SYNC 7 |
1651 | #define I_SYNC (1 << __I_SYNC) | 1660 | #define I_SYNC (1 << __I_SYNC) |
1661 | #define I_REFERENCED (1 << 8) | ||
1652 | 1662 | ||
1653 | #define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES) | 1663 | #define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES) |
1654 | 1664 | ||
@@ -1740,6 +1750,7 @@ static inline void file_accessed(struct file *file) | |||
1740 | } | 1750 | } |
1741 | 1751 | ||
1742 | int sync_inode(struct inode *inode, struct writeback_control *wbc); | 1752 | int sync_inode(struct inode *inode, struct writeback_control *wbc); |
1753 | int sync_inode_metadata(struct inode *inode, int wait); | ||
1743 | 1754 | ||
1744 | struct file_system_type { | 1755 | struct file_system_type { |
1745 | const char *name; | 1756 | const char *name; |
@@ -2084,7 +2095,6 @@ extern int check_disk_change(struct block_device *); | |||
2084 | extern int __invalidate_device(struct block_device *); | 2095 | extern int __invalidate_device(struct block_device *); |
2085 | extern int invalidate_partition(struct gendisk *, int); | 2096 | extern int invalidate_partition(struct gendisk *, int); |
2086 | #endif | 2097 | #endif |
2087 | extern int invalidate_inodes(struct super_block *); | ||
2088 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 2098 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
2089 | pgoff_t start, pgoff_t end); | 2099 | pgoff_t start, pgoff_t end); |
2090 | 2100 | ||
@@ -2168,7 +2178,7 @@ extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin); | |||
2168 | 2178 | ||
2169 | extern int inode_init_always(struct super_block *, struct inode *); | 2179 | extern int inode_init_always(struct super_block *, struct inode *); |
2170 | extern void inode_init_once(struct inode *); | 2180 | extern void inode_init_once(struct inode *); |
2171 | extern void inode_add_to_lists(struct super_block *, struct inode *); | 2181 | extern void ihold(struct inode * inode); |
2172 | extern void iput(struct inode *); | 2182 | extern void iput(struct inode *); |
2173 | extern struct inode * igrab(struct inode *); | 2183 | extern struct inode * igrab(struct inode *); |
2174 | extern ino_t iunique(struct super_block *, ino_t); | 2184 | extern ino_t iunique(struct super_block *, ino_t); |
@@ -2188,11 +2198,11 @@ extern struct inode * iget_locked(struct super_block *, unsigned long); | |||
2188 | extern int insert_inode_locked4(struct inode *, unsigned long, int (*test)(struct inode *, void *), void *); | 2198 | extern int insert_inode_locked4(struct inode *, unsigned long, int (*test)(struct inode *, void *), void *); |
2189 | extern int insert_inode_locked(struct inode *); | 2199 | extern int insert_inode_locked(struct inode *); |
2190 | extern void unlock_new_inode(struct inode *); | 2200 | extern void unlock_new_inode(struct inode *); |
2201 | extern unsigned int get_next_ino(void); | ||
2191 | 2202 | ||
2192 | extern void __iget(struct inode * inode); | 2203 | extern void __iget(struct inode * inode); |
2193 | extern void iget_failed(struct inode *); | 2204 | extern void iget_failed(struct inode *); |
2194 | extern void end_writeback(struct inode *); | 2205 | extern void end_writeback(struct inode *); |
2195 | extern void destroy_inode(struct inode *); | ||
2196 | extern void __destroy_inode(struct inode *); | 2206 | extern void __destroy_inode(struct inode *); |
2197 | extern struct inode *new_inode(struct super_block *); | 2207 | extern struct inode *new_inode(struct super_block *); |
2198 | extern int should_remove_suid(struct dentry *); | 2208 | extern int should_remove_suid(struct dentry *); |
@@ -2200,9 +2210,11 @@ extern int file_remove_suid(struct file *); | |||
2200 | 2210 | ||
2201 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); | 2211 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); |
2202 | extern void remove_inode_hash(struct inode *); | 2212 | extern void remove_inode_hash(struct inode *); |
2203 | static inline void insert_inode_hash(struct inode *inode) { | 2213 | static inline void insert_inode_hash(struct inode *inode) |
2214 | { | ||
2204 | __insert_inode_hash(inode, inode->i_ino); | 2215 | __insert_inode_hash(inode, inode->i_ino); |
2205 | } | 2216 | } |
2217 | extern void inode_sb_list_add(struct inode *inode); | ||
2206 | 2218 | ||
2207 | #ifdef CONFIG_BLOCK | 2219 | #ifdef CONFIG_BLOCK |
2208 | extern void submit_bio(int, struct bio *); | 2220 | extern void submit_bio(int, struct bio *); |
@@ -2485,7 +2497,10 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf, | |||
2485 | struct ctl_table; | 2497 | struct ctl_table; |
2486 | int proc_nr_files(struct ctl_table *table, int write, | 2498 | int proc_nr_files(struct ctl_table *table, int write, |
2487 | void __user *buffer, size_t *lenp, loff_t *ppos); | 2499 | void __user *buffer, size_t *lenp, loff_t *ppos); |
2488 | 2500 | int proc_nr_dentry(struct ctl_table *table, int write, | |
2501 | void __user *buffer, size_t *lenp, loff_t *ppos); | ||
2502 | int proc_nr_inodes(struct ctl_table *table, int write, | ||
2503 | void __user *buffer, size_t *lenp, loff_t *ppos); | ||
2489 | int __init get_filesystem_list(char *buf); | 2504 | int __init get_filesystem_list(char *buf); |
2490 | 2505 | ||
2491 | #define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) | 2506 | #define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) |
diff --git a/include/linux/list.h b/include/linux/list.h index 88a000617d77..9a5f8a71810c 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -636,6 +636,12 @@ static inline void hlist_add_after(struct hlist_node *n, | |||
636 | next->next->pprev = &next->next; | 636 | next->next->pprev = &next->next; |
637 | } | 637 | } |
638 | 638 | ||
639 | /* after that we'll appear to be on some hlist and hlist_del will work */ | ||
640 | static inline void hlist_add_fake(struct hlist_node *n) | ||
641 | { | ||
642 | n->pprev = &n->next; | ||
643 | } | ||
644 | |||
639 | /* | 645 | /* |
640 | * Move a list from one list head to another. Fixup the pprev | 646 | * Move a list from one list head to another. Fixup the pprev |
641 | * reference of the first entry if it exists. | 647 | * reference of the first entry if it exists. |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 91a4177e60ce..5ca47e59b727 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -2072,6 +2072,8 @@ void sd_attrs_to_i_attrs(__u16 sd_attrs, struct inode *inode); | |||
2072 | void i_attrs_to_sd_attrs(struct inode *inode, __u16 * sd_attrs); | 2072 | void i_attrs_to_sd_attrs(struct inode *inode, __u16 * sd_attrs); |
2073 | int reiserfs_setattr(struct dentry *dentry, struct iattr *attr); | 2073 | int reiserfs_setattr(struct dentry *dentry, struct iattr *attr); |
2074 | 2074 | ||
2075 | int __reiserfs_write_begin(struct page *page, unsigned from, unsigned len); | ||
2076 | |||
2075 | /* namei.c */ | 2077 | /* namei.c */ |
2076 | void set_de_name_and_namelen(struct reiserfs_dir_entry *de); | 2078 | void set_de_name_and_namelen(struct reiserfs_dir_entry *de); |
2077 | int search_by_entry_key(struct super_block *sb, const struct cpu_key *key, | 2079 | int search_by_entry_key(struct super_block *sb, const struct cpu_key *key, |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index c7299d2ace6b..d5c7aaadda59 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -10,8 +10,6 @@ | |||
10 | struct backing_dev_info; | 10 | struct backing_dev_info; |
11 | 11 | ||
12 | extern spinlock_t inode_lock; | 12 | extern spinlock_t inode_lock; |
13 | extern struct list_head inode_in_use; | ||
14 | extern struct list_head inode_unused; | ||
15 | 13 | ||
16 | /* | 14 | /* |
17 | * fs/fs-writeback.c | 15 | * fs/fs-writeback.c |