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