]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/ecryptfs/main.c
Merge tag 'xfs-4.14-fixes-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[mirror_ubuntu-bionic-kernel.git] / fs / ecryptfs / main.c
index 9014479d01600be356b87c284c675ada55b6a723..6b801186baa588ce996ed1a69cb6bc1dfe74b234 100644 (file)
@@ -568,8 +568,7 @@ static struct dentry *ecryptfs_mount(struct file_system_type *fs_type, int flags
         *   1) The lower mount is ro
         *   2) The ecryptfs_encrypted_view mount option is specified
         */
-       if (path.dentry->d_sb->s_flags & MS_RDONLY ||
-           mount_crypt_stat->flags & ECRYPTFS_ENCRYPTED_VIEW_ENABLED)
+       if (sb_rdonly(path.dentry->d_sb) || mount_crypt_stat->flags & ECRYPTFS_ENCRYPTED_VIEW_ENABLED)
                s->s_flags |= MS_RDONLY;
 
        s->s_maxbytes = path.dentry->d_sb->s_maxbytes;