diff options
Diffstat (limited to 'fs/gfs2/log.h')
-rw-r--r-- | fs/gfs2/log.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/gfs2/log.h b/fs/gfs2/log.h index 1862e310a067..20241436126d 100644 --- a/fs/gfs2/log.h +++ b/fs/gfs2/log.h @@ -14,6 +14,7 @@ #include <linux/spinlock.h> #include <linux/writeback.h> #include "incore.h" +#include "inode.h" /** * gfs2_log_lock - acquire the right to mess with the log manager @@ -50,8 +51,12 @@ 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 = GFS2_SB(&ip->i_inode); + struct gfs2_sbd *sdp; + if (!gfs2_is_ordered(ip)) + 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)) |