diff options
author | David S. Miller <davem@davemloft.net> | 2011-08-08 02:20:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-08 02:20:26 -0400 |
commit | 19fd61785a580c60cba900c5171bfadb57dd5056 (patch) | |
tree | 1e491fb014be0dc03f4b6755bb94e73afd38c455 /include/linux/fs.h | |
parent | 57569d0e12eaf31717e295960cd2a26f626c8e5b (diff) | |
parent | 8028837d71ba9904b17281b40f94b93e947fbe38 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 68 |
1 files changed, 45 insertions, 23 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index f23bcb77260c..178cdb4f1d4a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -738,22 +738,54 @@ static inline int mapping_writably_mapped(struct address_space *mapping) | |||
738 | struct posix_acl; | 738 | struct posix_acl; |
739 | #define ACL_NOT_CACHED ((void *)(-1)) | 739 | #define ACL_NOT_CACHED ((void *)(-1)) |
740 | 740 | ||
741 | #define IOP_FASTPERM 0x0001 | ||
742 | #define IOP_LOOKUP 0x0002 | ||
743 | #define IOP_NOFOLLOW 0x0004 | ||
744 | |||
745 | /* | ||
746 | * Keep mostly read-only and often accessed (especially for | ||
747 | * the RCU path lookup and 'stat' data) fields at the beginning | ||
748 | * of the 'struct inode' | ||
749 | */ | ||
741 | struct inode { | 750 | struct inode { |
742 | /* RCU path lookup touches following: */ | ||
743 | umode_t i_mode; | 751 | umode_t i_mode; |
752 | unsigned short i_opflags; | ||
744 | uid_t i_uid; | 753 | uid_t i_uid; |
745 | gid_t i_gid; | 754 | gid_t i_gid; |
755 | unsigned int i_flags; | ||
756 | |||
757 | #ifdef CONFIG_FS_POSIX_ACL | ||
758 | struct posix_acl *i_acl; | ||
759 | struct posix_acl *i_default_acl; | ||
760 | #endif | ||
761 | |||
746 | const struct inode_operations *i_op; | 762 | const struct inode_operations *i_op; |
747 | struct super_block *i_sb; | 763 | struct super_block *i_sb; |
764 | struct address_space *i_mapping; | ||
748 | 765 | ||
749 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ | ||
750 | unsigned int i_flags; | ||
751 | unsigned long i_state; | ||
752 | #ifdef CONFIG_SECURITY | 766 | #ifdef CONFIG_SECURITY |
753 | void *i_security; | 767 | void *i_security; |
754 | #endif | 768 | #endif |
755 | struct mutex i_mutex; | ||
756 | 769 | ||
770 | /* Stat data, not accessed from path walking */ | ||
771 | unsigned long i_ino; | ||
772 | unsigned int i_nlink; | ||
773 | dev_t i_rdev; | ||
774 | loff_t i_size; | ||
775 | struct timespec i_atime; | ||
776 | struct timespec i_mtime; | ||
777 | struct timespec i_ctime; | ||
778 | unsigned int i_blkbits; | ||
779 | blkcnt_t i_blocks; | ||
780 | |||
781 | #ifdef __NEED_I_SIZE_ORDERED | ||
782 | seqcount_t i_size_seqcount; | ||
783 | #endif | ||
784 | |||
785 | /* Misc */ | ||
786 | unsigned long i_state; | ||
787 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ | ||
788 | struct mutex i_mutex; | ||
757 | 789 | ||
758 | unsigned long dirtied_when; /* jiffies of first dirtying */ | 790 | unsigned long dirtied_when; /* jiffies of first dirtying */ |
759 | 791 | ||
@@ -765,25 +797,12 @@ struct inode { | |||
765 | struct list_head i_dentry; | 797 | struct list_head i_dentry; |
766 | struct rcu_head i_rcu; | 798 | struct rcu_head i_rcu; |
767 | }; | 799 | }; |
768 | unsigned long i_ino; | ||
769 | atomic_t i_count; | 800 | atomic_t i_count; |
770 | unsigned int i_nlink; | ||
771 | dev_t i_rdev; | ||
772 | unsigned int i_blkbits; | ||
773 | u64 i_version; | 801 | u64 i_version; |
774 | loff_t i_size; | ||
775 | #ifdef __NEED_I_SIZE_ORDERED | ||
776 | seqcount_t i_size_seqcount; | ||
777 | #endif | ||
778 | struct timespec i_atime; | ||
779 | struct timespec i_mtime; | ||
780 | struct timespec i_ctime; | ||
781 | blkcnt_t i_blocks; | ||
782 | unsigned short i_bytes; | 802 | unsigned short i_bytes; |
783 | atomic_t i_dio_count; | 803 | atomic_t i_dio_count; |
784 | const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ | 804 | const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ |
785 | struct file_lock *i_flock; | 805 | struct file_lock *i_flock; |
786 | struct address_space *i_mapping; | ||
787 | struct address_space i_data; | 806 | struct address_space i_data; |
788 | #ifdef CONFIG_QUOTA | 807 | #ifdef CONFIG_QUOTA |
789 | struct dquot *i_dquot[MAXQUOTAS]; | 808 | struct dquot *i_dquot[MAXQUOTAS]; |
@@ -806,10 +825,6 @@ struct inode { | |||
806 | atomic_t i_readcount; /* struct files open RO */ | 825 | atomic_t i_readcount; /* struct files open RO */ |
807 | #endif | 826 | #endif |
808 | atomic_t i_writecount; | 827 | atomic_t i_writecount; |
809 | #ifdef CONFIG_FS_POSIX_ACL | ||
810 | struct posix_acl *i_acl; | ||
811 | struct posix_acl *i_default_acl; | ||
812 | #endif | ||
813 | void *i_private; /* fs or device private pointer */ | 828 | void *i_private; /* fs or device private pointer */ |
814 | }; | 829 | }; |
815 | 830 | ||
@@ -2317,11 +2332,18 @@ extern int should_remove_suid(struct dentry *); | |||
2317 | extern int file_remove_suid(struct file *); | 2332 | extern int file_remove_suid(struct file *); |
2318 | 2333 | ||
2319 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); | 2334 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); |
2320 | extern void remove_inode_hash(struct inode *); | ||
2321 | static inline void insert_inode_hash(struct inode *inode) | 2335 | static inline void insert_inode_hash(struct inode *inode) |
2322 | { | 2336 | { |
2323 | __insert_inode_hash(inode, inode->i_ino); | 2337 | __insert_inode_hash(inode, inode->i_ino); |
2324 | } | 2338 | } |
2339 | |||
2340 | extern void __remove_inode_hash(struct inode *); | ||
2341 | static inline void remove_inode_hash(struct inode *inode) | ||
2342 | { | ||
2343 | if (!inode_unhashed(inode)) | ||
2344 | __remove_inode_hash(inode); | ||
2345 | } | ||
2346 | |||
2325 | extern void inode_sb_list_add(struct inode *inode); | 2347 | extern void inode_sb_list_add(struct inode *inode); |
2326 | 2348 | ||
2327 | #ifdef CONFIG_BLOCK | 2349 | #ifdef CONFIG_BLOCK |