VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Bob Peterson <rpeterso@redhat.com> 2019-02-12 13:43:55 -0700 committer: Bob Peterson <rpeterso@redhat.com> 2020-02-10 07:39:47 -0600 commit: 69511080bd6efd34f4e020fcde6cf73bb4a61af6 parent: 8e28ef1f2fa176854f96fb0416f2aaf5516793d0
Commit Summary:
gfs2: Introduce concept of a pending withdraw
Diffstat:
1 file changed, 11 insertions, 1 deletion
diff --git a/fs/gfs2/util.h b/fs/gfs2/util.h
index 572399e75ce6..16b2cc6c4560 100644
--- a/fs/gfs2/util.h
+++ b/fs/gfs2/util.h
@@ -172,13 +172,23 @@ static inline unsigned int gfs2_tune_get_i(struct gfs2_tune *gt,
 	return x;
 }
 
+/**
+ * gfs2_withdraw_delayed - withdraw as soon as possible without deadlocks
+ * @sdp: the superblock
+ */
+static inline void gfs2_withdraw_delayed(struct gfs2_sbd *sdp)
+{
+	set_bit(SDF_WITHDRAWING, &sdp->sd_flags);
+}
+
 /**
  * gfs2_withdrawn - test whether the file system is withdrawing or withdrawn
  * @sdp: the superblock
  */
 static inline bool gfs2_withdrawn(struct gfs2_sbd *sdp)
 {
-	return test_bit(SDF_WITHDRAWN, &sdp->sd_flags);
+	return test_bit(SDF_WITHDRAWN, &sdp->sd_flags) ||
+		test_bit(SDF_WITHDRAWING, &sdp->sd_flags);
 }
 
 #define gfs2_tune_get(sdp, field) \