This repository has been archived by the owner on May 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setting cancelling flag before op cancel and up the semephore in canc…
…el ast. m0_op_cancel() is used to cancel an ongoing operation. The real cancel is posted as an AST(idx_op_cancel_ast) in m0__idx_cancel(). But before/while this AST gets executed, the op itself may already be stable and m0_op_fini() may already be called and this op may already be freed. An op cancelling flag and a semaphore are introduced to synchronize the op cancel and op finalization. So, take the semaphore before destroying it, and up the semaphore when the cancel AST finishes. Signed-off-by: Hua Huang <hua.huang@seagate.com>
- Loading branch information
Showing
3 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters