aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2017-07-17 03:45:34 -0400
committerDavid Howells <dhowells@redhat.com>2017-07-17 03:45:34 -0400
commit94e92e7ac90d06e1e839e112d3ae80b2457dbdd7 (patch)
treea21c79f5282e36379e5675de12f07c1d8359af05
parent87b2c3fc63175bb32c96d4ec58152d4fdd5a4ae1 (diff)
vfs: Add sb_rdonly(sb) to query the MS_RDONLY flag on s_flags
Add an sb_rdonly() function to query the MS_RDONLY flag on sb->s_flags preparatory to providing an SB_RDONLY flag. Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r--include/linux/fs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 7b5d6816542b..6ae137c1bdf6 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1844,7 +1844,8 @@ struct super_operations {
1844 */ 1844 */
1845#define __IS_FLG(inode, flg) ((inode)->i_sb->s_flags & (flg)) 1845#define __IS_FLG(inode, flg) ((inode)->i_sb->s_flags & (flg))
1846 1846
1847#define IS_RDONLY(inode) ((inode)->i_sb->s_flags & MS_RDONLY) 1847static inline bool sb_rdonly(const struct super_block *sb) { return sb->s_flags & MS_RDONLY; }
1848#define IS_RDONLY(inode) sb_rdonly((inode)->i_sb)
1848#define IS_SYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS) || \ 1849#define IS_SYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS) || \
1849 ((inode)->i_flags & S_SYNC)) 1850 ((inode)->i_flags & S_SYNC))
1850#define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \ 1851#define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \