summaryrefslogtreecommitdiff
path: root/fs/ext4/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/file.c')
-rw-r--r--fs/ext4/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 57dcaea762c3..da9c6948ad25 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -371,7 +371,7 @@ static int ext4_file_open(struct inode * inode, struct file * filp)
return -EIO;
if (unlikely(!(sbi->s_mount_flags & EXT4_MF_MNTDIR_SAMPLED) &&
- !(sb->s_flags & MS_RDONLY))) {
+ !sb_rdonly(sb))) {
sbi->s_mount_flags |= EXT4_MF_MNTDIR_SAMPLED;
/*
* Sample where the filesystem has been mounted and