diff options
Diffstat (limited to 'fs/gfs2/inode.h')
-rw-r--r-- | fs/gfs2/inode.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/gfs2/inode.h b/fs/gfs2/inode.h index 351ac87ab384..d44650662615 100644 --- a/fs/gfs2/inode.h +++ b/fs/gfs2/inode.h | |||
@@ -20,6 +20,18 @@ static inline int gfs2_is_jdata(const struct gfs2_inode *ip) | |||
20 | return ip->i_di.di_flags & GFS2_DIF_JDATA; | 20 | return ip->i_di.di_flags & GFS2_DIF_JDATA; |
21 | } | 21 | } |
22 | 22 | ||
23 | static inline int gfs2_is_writeback(const struct gfs2_inode *ip) | ||
24 | { | ||
25 | const struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); | ||
26 | return (sdp->sd_args.ar_data == GFS2_DATA_WRITEBACK) && !gfs2_is_jdata(ip); | ||
27 | } | ||
28 | |||
29 | static inline int gfs2_is_ordered(const struct gfs2_inode *ip) | ||
30 | { | ||
31 | const struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); | ||
32 | return (sdp->sd_args.ar_data == GFS2_DATA_ORDERED) && !gfs2_is_jdata(ip); | ||
33 | } | ||
34 | |||
23 | static inline int gfs2_is_dir(const struct gfs2_inode *ip) | 35 | static inline int gfs2_is_dir(const struct gfs2_inode *ip) |
24 | { | 36 | { |
25 | return S_ISDIR(ip->i_inode.i_mode); | 37 | return S_ISDIR(ip->i_inode.i_mode); |