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 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 | */ | ||
2568 | void 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 | |||
2578 | void ocfs2_unblock_signals(sigset_t *oldset) | ||
2579 | { | ||
2580 | int rc = sigprocmask(SIG_SETMASK, oldset, NULL); | ||
2581 | BUG_ON(rc); | ||
2582 | } | ||
2583 | |||
2564 | module_init(ocfs2_init); | 2584 | module_init(ocfs2_init); |
2565 | module_exit(ocfs2_exit); | 2585 | module_exit(ocfs2_exit); |