diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 59 |
1 files changed, 37 insertions, 22 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 786b3b1113cf..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 | ||