aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r--fs/ocfs2/super.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 106becf5d00f..1c2c39f6f0b6 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -2561,5 +2561,25 @@ void __ocfs2_abort(struct super_block* sb,
2561 ocfs2_handle_error(sb); 2561 ocfs2_handle_error(sb);
2562} 2562}
2563 2563
2564/*
2565 * Void signal blockers, because in-kernel sigprocmask() only fails
2566 * when SIG_* is wrong.
2567 */
2568void ocfs2_block_signals(sigset_t *oldset)
2569{
2570 int rc;
2571 sigset_t blocked;
2572
2573 sigfillset(&blocked);
2574 rc = sigprocmask(SIG_BLOCK, &blocked, oldset);
2575 BUG_ON(rc);
2576}
2577
2578void ocfs2_unblock_signals(sigset_t *oldset)
2579{
2580 int rc = sigprocmask(SIG_SETMASK, oldset, NULL);
2581 BUG_ON(rc);
2582}
2583
2564module_init(ocfs2_init); 2584module_init(ocfs2_init);
2565module_exit(ocfs2_exit); 2585module_exit(ocfs2_exit);