Merge branch 'pm-cpufreq'
[platform/kernel/linux-starfive.git] / fs / gfs2 / meta_io.c
index 7c96199..72d30a6 100644 (file)
@@ -258,8 +258,7 @@ int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags,
        struct buffer_head *bh, *bhs[2];
        int num = 0;
 
-       if (unlikely(gfs2_withdrawn(sdp)) &&
-           (!sdp->sd_jdesc || gl != sdp->sd_jinode_gl)) {
+       if (unlikely(gfs2_withdrawn(sdp)) && !gfs2_withdraw_in_prog(sdp)) {
                *bhp = NULL;
                return -EIO;
        }
@@ -317,7 +316,7 @@ int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags,
 
 int gfs2_meta_wait(struct gfs2_sbd *sdp, struct buffer_head *bh)
 {
-       if (unlikely(gfs2_withdrawn(sdp)))
+       if (unlikely(gfs2_withdrawn(sdp)) && !gfs2_withdraw_in_prog(sdp))
                return -EIO;
 
        wait_on_buffer(bh);
@@ -328,7 +327,7 @@ int gfs2_meta_wait(struct gfs2_sbd *sdp, struct buffer_head *bh)
                        gfs2_io_error_bh_wd(sdp, bh);
                return -EIO;
        }
-       if (unlikely(gfs2_withdrawn(sdp)))
+       if (unlikely(gfs2_withdrawn(sdp)) && !gfs2_withdraw_in_prog(sdp))
                return -EIO;
 
        return 0;