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.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 2995a271ec46..511fbaabf624 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1872,7 +1872,7 @@ struct super_operations {
1872 */ 1872 */
1873#define __IS_FLG(inode, flg) ((inode)->i_sb->s_flags & (flg)) 1873#define __IS_FLG(inode, flg) ((inode)->i_sb->s_flags & (flg))
1874 1874
1875static inline bool sb_rdonly(const struct super_block *sb) { return sb->s_flags & MS_RDONLY; } 1875static inline bool sb_rdonly(const struct super_block *sb) { return sb->s_flags & SB_RDONLY; }
1876#define IS_RDONLY(inode) sb_rdonly((inode)->i_sb) 1876#define IS_RDONLY(inode) sb_rdonly((inode)->i_sb)
1877#define IS_SYNC(inode) (__IS_FLG(inode, SB_SYNCHRONOUS) || \ 1877#define IS_SYNC(inode) (__IS_FLG(inode, SB_SYNCHRONOUS) || \
1878 ((inode)->i_flags & S_SYNC)) 1878 ((inode)->i_flags & S_SYNC))
@@ -3088,7 +3088,8 @@ static inline int vfs_lstat(const char __user *name, struct kstat *stat)
3088static inline int vfs_fstatat(int dfd, const char __user *filename, 3088static inline int vfs_fstatat(int dfd, const char __user *filename,
3089 struct kstat *stat, int flags) 3089 struct kstat *stat, int flags)
3090{ 3090{
3091 return vfs_statx(dfd, filename, flags, stat, STATX_BASIC_STATS); 3091 return vfs_statx(dfd, filename, flags | AT_NO_AUTOMOUNT,
3092 stat, STATX_BASIC_STATS);
3092} 3093}
3093static inline int vfs_fstat(int fd, struct kstat *stat) 3094static inline int vfs_fstat(int fd, struct kstat *stat)
3094{ 3095{
@@ -3194,6 +3195,20 @@ static inline bool vma_is_dax(struct vm_area_struct *vma)
3194 return vma->vm_file && IS_DAX(vma->vm_file->f_mapping->host); 3195 return vma->vm_file && IS_DAX(vma->vm_file->f_mapping->host);
3195} 3196}
3196 3197
3198static inline bool vma_is_fsdax(struct vm_area_struct *vma)
3199{
3200 struct inode *inode;
3201
3202 if (!vma->vm_file)
3203 return false;
3204 if (!vma_is_dax(vma))
3205 return false;
3206 inode = file_inode(vma->vm_file);
3207 if (inode->i_mode == S_IFCHR)
3208 return false; /* device-dax */
3209 return true;
3210}
3211
3197static inline int iocb_flags(struct file *file) 3212static inline int iocb_flags(struct file *file)
3198{ 3213{
3199 int res = 0; 3214 int res = 0;