Эх сурвалжийг харах

[GFS2] Tweek unlock test in readpage()

This make the unlock test a bit simpler.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Steven Whitehouse 18 жил өмнө
parent
commit
07903c02d0

+ 1 - 2
fs/gfs2/ops_address.c

@@ -247,8 +247,7 @@ skip_lock:
 	if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
 	if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
 		error = -EIO;
 		error = -EIO;
 
 
-	if (gf && !test_bit(GFF_EXLOCK, &gf->f_flags) &&
-	    file != &gfs2_internal_file_sentinel) {
+	if (do_unlock) {
 		gfs2_glock_dq_m(1, &gh);
 		gfs2_glock_dq_m(1, &gh);
 		gfs2_holder_uninit(&gh);
 		gfs2_holder_uninit(&gh);
 	}
 	}