From 977767a7e1ee32ae85377d88b5383da789d2a6b5 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Fri, 12 Oct 2018 20:07:27 +0200 Subject: gfs2: Clean up gfs2_is_{ordered,writeback} The gfs2_is_ordered and gfs2_is_writeback checks are weird in that they implicitly check for !gfs2_is_jdata. This makes understanding how to use those functions correctly a challenge. Clean this up by making gfs2_is_ordered and gfs2_is_writeback take a super block instead of an inode and by removing the implicit !gfs2_is_jdata checks. Update the callers accordingly. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/log.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'fs/gfs2/log.h') diff --git a/fs/gfs2/log.h b/fs/gfs2/log.h index 20241436126d..1bc9bd444b28 100644 --- a/fs/gfs2/log.h +++ b/fs/gfs2/log.h @@ -51,12 +51,11 @@ static inline void gfs2_log_pointers_init(struct gfs2_sbd *sdp, static inline void gfs2_ordered_add_inode(struct gfs2_inode *ip) { - struct gfs2_sbd *sdp; + struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); - if (!gfs2_is_ordered(ip)) + if (gfs2_is_jdata(ip) || !gfs2_is_ordered(sdp)) return; - sdp = GFS2_SB(&ip->i_inode); if (!test_bit(GIF_ORDERED, &ip->i_flags)) { spin_lock(&sdp->sd_ordered_lock); if (!test_and_set_bit(GIF_ORDERED, &ip->i_flags)) -- cgit v1.2.3