aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2007-10-17 03:35:19 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2008-01-25 03:07:21 -0500
commitbf36a713169432643d4fc7eeb4e0ace96d791d26 (patch)
tree2cb69c9716b9ee8c687ef807bb88d5e635db3462 /fs/gfs2/inode.h
parente7e36f143565d14950055c893cfaf4400ad64d34 (diff)
[GFS2] Add gfs2_is_writeback()
This adds a function "gfs2_is_writeback()" along the lines of the existing "gfs2_is_jdata()" in order to clean up the code and make the various tests for the inode mode more obvious. It also fixes the PageChecked() logic where we were resetting the flag too early in the case of an error path. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/inode.h')
-rw-r--r--fs/gfs2/inode.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/gfs2/inode.h b/fs/gfs2/inode.h
index 351ac87ab384..bed3dc212a18 100644
--- a/fs/gfs2/inode.h
+++ b/fs/gfs2/inode.h
@@ -20,6 +20,12 @@ 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
23static 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
23static inline int gfs2_is_dir(const struct gfs2_inode *ip) 29static inline int gfs2_is_dir(const struct gfs2_inode *ip)
24{ 30{
25 return S_ISDIR(ip->i_inode.i_mode); 31 return S_ISDIR(ip->i_inode.i_mode);