diff options
Diffstat (limited to 'include/linux/fs.h')
| -rw-r--r-- | include/linux/fs.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index f21b15804917..bb29b02d9bb6 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -786,7 +786,6 @@ struct file { | |||
| 786 | struct rcu_head fu_rcuhead; | 786 | struct rcu_head fu_rcuhead; |
| 787 | } f_u; | 787 | } f_u; |
| 788 | struct path f_path; | 788 | struct path f_path; |
| 789 | #define f_dentry f_path.dentry | ||
| 790 | struct inode *f_inode; /* cached value */ | 789 | struct inode *f_inode; /* cached value */ |
| 791 | const struct file_operations *f_op; | 790 | const struct file_operations *f_op; |
| 792 | 791 | ||
| @@ -1465,7 +1464,10 @@ int fiemap_check_flags(struct fiemap_extent_info *fieinfo, u32 fs_flags); | |||
| 1465 | * This allows the kernel to read directories into kernel space or | 1464 | * This allows the kernel to read directories into kernel space or |
| 1466 | * to have different dirent layouts depending on the binary type. | 1465 | * to have different dirent layouts depending on the binary type. |
| 1467 | */ | 1466 | */ |
| 1468 | typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned); | 1467 | struct dir_context; |
| 1468 | typedef int (*filldir_t)(struct dir_context *, const char *, int, loff_t, u64, | ||
| 1469 | unsigned); | ||
| 1470 | |||
| 1469 | struct dir_context { | 1471 | struct dir_context { |
| 1470 | const filldir_t actor; | 1472 | const filldir_t actor; |
| 1471 | loff_t pos; | 1473 | loff_t pos; |
| @@ -1511,7 +1513,7 @@ struct file_operations { | |||
| 1511 | int (*setlease)(struct file *, long, struct file_lock **, void **); | 1513 | int (*setlease)(struct file *, long, struct file_lock **, void **); |
| 1512 | long (*fallocate)(struct file *file, int mode, loff_t offset, | 1514 | long (*fallocate)(struct file *file, int mode, loff_t offset, |
| 1513 | loff_t len); | 1515 | loff_t len); |
| 1514 | int (*show_fdinfo)(struct seq_file *m, struct file *f); | 1516 | void (*show_fdinfo)(struct seq_file *m, struct file *f); |
| 1515 | }; | 1517 | }; |
| 1516 | 1518 | ||
| 1517 | struct inode_operations { | 1519 | struct inode_operations { |
| @@ -2787,6 +2789,11 @@ static inline void inode_has_no_xattr(struct inode *inode) | |||
| 2787 | inode->i_flags |= S_NOSEC; | 2789 | inode->i_flags |= S_NOSEC; |
| 2788 | } | 2790 | } |
| 2789 | 2791 | ||
| 2792 | static inline bool is_root_inode(struct inode *inode) | ||
| 2793 | { | ||
| 2794 | return inode == inode->i_sb->s_root->d_inode; | ||
| 2795 | } | ||
| 2796 | |||
| 2790 | static inline bool dir_emit(struct dir_context *ctx, | 2797 | static inline bool dir_emit(struct dir_context *ctx, |
| 2791 | const char *name, int namelen, | 2798 | const char *name, int namelen, |
| 2792 | u64 ino, unsigned type) | 2799 | u64 ino, unsigned type) |
