aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 9ab779e8a63c..bb29b02d9bb6 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -606,9 +606,6 @@ struct inode {
606 const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ 606 const struct file_operations *i_fop; /* former ->i_op->default_file_ops */
607 struct file_lock *i_flock; 607 struct file_lock *i_flock;
608 struct address_space i_data; 608 struct address_space i_data;
609#ifdef CONFIG_QUOTA
610 struct dquot *i_dquot[MAXQUOTAS];
611#endif
612 struct list_head i_devices; 609 struct list_head i_devices;
613 union { 610 union {
614 struct pipe_inode_info *i_pipe; 611 struct pipe_inode_info *i_pipe;
@@ -789,7 +786,6 @@ struct file {
789 struct rcu_head fu_rcuhead; 786 struct rcu_head fu_rcuhead;
790 } f_u; 787 } f_u;
791 struct path f_path; 788 struct path f_path;
792#define f_dentry f_path.dentry
793 struct inode *f_inode; /* cached value */ 789 struct inode *f_inode; /* cached value */
794 const struct file_operations *f_op; 790 const struct file_operations *f_op;
795 791
@@ -1224,6 +1220,7 @@ struct super_block {
1224 struct backing_dev_info *s_bdi; 1220 struct backing_dev_info *s_bdi;
1225 struct mtd_info *s_mtd; 1221 struct mtd_info *s_mtd;
1226 struct hlist_node s_instances; 1222 struct hlist_node s_instances;
1223 unsigned int s_quota_types; /* Bitmask of supported quota types */
1227 struct quota_info s_dquot; /* Diskquota specific options */ 1224 struct quota_info s_dquot; /* Diskquota specific options */
1228 1225
1229 struct sb_writers s_writers; 1226 struct sb_writers s_writers;
@@ -1467,7 +1464,10 @@ int fiemap_check_flags(struct fiemap_extent_info *fieinfo, u32 fs_flags);
1467 * This allows the kernel to read directories into kernel space or 1464 * This allows the kernel to read directories into kernel space or
1468 * to have different dirent layouts depending on the binary type. 1465 * to have different dirent layouts depending on the binary type.
1469 */ 1466 */
1470typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned); 1467struct dir_context;
1468typedef int (*filldir_t)(struct dir_context *, const char *, int, loff_t, u64,
1469 unsigned);
1470
1471struct dir_context { 1471struct dir_context {
1472 const filldir_t actor; 1472 const filldir_t actor;
1473 loff_t pos; 1473 loff_t pos;
@@ -1513,7 +1513,7 @@ struct file_operations {
1513 int (*setlease)(struct file *, long, struct file_lock **, void **); 1513 int (*setlease)(struct file *, long, struct file_lock **, void **);
1514 long (*fallocate)(struct file *file, int mode, loff_t offset, 1514 long (*fallocate)(struct file *file, int mode, loff_t offset,
1515 loff_t len); 1515 loff_t len);
1516 int (*show_fdinfo)(struct seq_file *m, struct file *f); 1516 void (*show_fdinfo)(struct seq_file *m, struct file *f);
1517}; 1517};
1518 1518
1519struct inode_operations { 1519struct inode_operations {
@@ -1577,7 +1577,9 @@ struct super_operations {
1577 void (*evict_inode) (struct inode *); 1577 void (*evict_inode) (struct inode *);
1578 void (*put_super) (struct super_block *); 1578 void (*put_super) (struct super_block *);
1579 int (*sync_fs)(struct super_block *sb, int wait); 1579 int (*sync_fs)(struct super_block *sb, int wait);
1580 int (*freeze_super) (struct super_block *);
1580 int (*freeze_fs) (struct super_block *); 1581 int (*freeze_fs) (struct super_block *);
1582 int (*thaw_super) (struct super_block *);
1581 int (*unfreeze_fs) (struct super_block *); 1583 int (*unfreeze_fs) (struct super_block *);
1582 int (*statfs) (struct dentry *, struct kstatfs *); 1584 int (*statfs) (struct dentry *, struct kstatfs *);
1583 int (*remount_fs) (struct super_block *, int *, char *); 1585 int (*remount_fs) (struct super_block *, int *, char *);
@@ -1590,6 +1592,7 @@ struct super_operations {
1590#ifdef CONFIG_QUOTA 1592#ifdef CONFIG_QUOTA
1591 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); 1593 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
1592 ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); 1594 ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
1595 struct dquot **(*get_dquots)(struct inode *);
1593#endif 1596#endif
1594 int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t); 1597 int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t);
1595 long (*nr_cached_objects)(struct super_block *, int); 1598 long (*nr_cached_objects)(struct super_block *, int);
@@ -2786,6 +2789,11 @@ static inline void inode_has_no_xattr(struct inode *inode)
2786 inode->i_flags |= S_NOSEC; 2789 inode->i_flags |= S_NOSEC;
2787} 2790}
2788 2791
2792static inline bool is_root_inode(struct inode *inode)
2793{
2794 return inode == inode->i_sb->s_root->d_inode;
2795}
2796
2789static inline bool dir_emit(struct dir_context *ctx, 2797static inline bool dir_emit(struct dir_context *ctx,
2790 const char *name, int namelen, 2798 const char *name, int namelen,
2791 u64 ino, unsigned type) 2799 u64 ino, unsigned type)