GFS2: Add origin indicator to glock callbacks
[firefly-linux-kernel-4.4.55.git] / fs / gfs2 / glops.c
index 444b6503ebc404f710aafe371b8b49e100bfba1b..c66e99c9757143a89ada8058b6f0c10a59d0d580 100644 (file)
@@ -515,12 +515,12 @@ static int trans_go_demote_ok(const struct gfs2_glock *gl)
  *
  * gl_spin lock is held while calling this
  */
-static void iopen_go_callback(struct gfs2_glock *gl)
+static void iopen_go_callback(struct gfs2_glock *gl, bool remote)
 {
        struct gfs2_inode *ip = (struct gfs2_inode *)gl->gl_object;
        struct gfs2_sbd *sdp = gl->gl_sbd;
 
-       if (sdp->sd_vfs->s_flags & MS_RDONLY)
+       if (!remote || (sdp->sd_vfs->s_flags & MS_RDONLY))
                return;
 
        if (gl->gl_demote_state == LM_ST_UNLOCKED &&