summaryrefslogtreecommitdiff
path: root/fs/gfs2/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/util.h')
-rw-r--r--fs/gfs2/util.h12
1 files changed, 11 insertions, 1 deletions
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
@@ -173,12 +173,22 @@ static inline unsigned int gfs2_tune_get_i(struct gfs2_tune *gt,
}
/**
+ * 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) \