summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/super.h
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2009-09-03 02:17:36 +0200
committerJoel Becker <joel.becker@oracle.com>2010-05-10 20:50:10 +0200
commite4b963f10e9026c83419b5c25b93a0350413cf16 (patch)
treed162595c9f79626d040cb28c84e53fd8b7fe50ff /fs/ocfs2/super.h
parentocfs2/dlm: Increase o2dlm lockres hash size (diff)
downloadlinux-e4b963f10e9026c83419b5c25b93a0350413cf16.tar.xz
linux-e4b963f10e9026c83419b5c25b93a0350413cf16.zip
ocfs2: Wrap signal blocking in void functions.
ocfs2 sometimes needs to block signals around dlm operations, but it currently does it with sigprocmask(). Even worse, it's checking the error code of sigprocmask(). The in-kernel sigprocmask() can only error if you get the SIG_* argument wrong. We don't. Wrap the sigprocmask() calls with ocfs2_[un]block_signals(). These functions are void, but they will BUG() if somehow sigprocmask() returns an error. Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/super.h')
-rw-r--r--fs/ocfs2/super.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ocfs2/super.h b/fs/ocfs2/super.h
index 783f5270f2a1..40c7de084c10 100644
--- a/fs/ocfs2/super.h
+++ b/fs/ocfs2/super.h
@@ -45,4 +45,11 @@ void __ocfs2_abort(struct super_block *sb,
#define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __PRETTY_FUNCTION__, fmt, ##args)
+/*
+ * Void signal blockers, because in-kernel sigprocmask() only fails
+ * when SIG_* is wrong.
+ */
+void ocfs2_block_signals(sigset_t *oldset);
+void ocfs2_unblock_signals(sigset_t *oldset);
+
#endif /* OCFS2_SUPER_H */