EDAC, ghes: Model a single, logical memory controller
[sfrench/cifs-2.6.git] / fs / namei.c
index 1180f9c58093f723781ce981d8a2f2ef40a3c461..c75ea03ca147ec81977f67929b7f4489b90cf42e 100644 (file)
@@ -447,8 +447,7 @@ static int sb_permission(struct super_block *sb, struct inode *inode, int mask)
                umode_t mode = inode->i_mode;
 
                /* Nobody gets write access to a read-only fs. */
-               if ((sb->s_flags & MS_RDONLY) &&
-                   (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode)))
+               if (sb_rdonly(sb) && (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode)))
                        return -EROFS;
        }
        return 0;