mirror of
https://github.com/versity/scoutfs.git
synced 2026-04-23 15:00:29 +00:00
Add client timeout to farewell completion wait.
Replace unbounded wait_for_completion() with a 120 second timeout to prevent indefinite hangs during unmount if the server never responds to the farewell request. Signed-off-by: Auke Kok <auke.kok@versity.com>
This commit is contained in:
@@ -646,8 +646,12 @@ void scoutfs_client_destroy(struct super_block *sb)
|
||||
client_farewell_response,
|
||||
NULL, NULL);
|
||||
if (ret == 0) {
|
||||
wait_for_completion(&client->farewell_comp);
|
||||
ret = client->farewell_error;
|
||||
if (!wait_for_completion_timeout(&client->farewell_comp,
|
||||
120 * HZ)) {
|
||||
ret = -ETIMEDOUT;
|
||||
} else {
|
||||
ret = client->farewell_error;
|
||||
}
|
||||
}
|
||||
if (ret) {
|
||||
scoutfs_inc_counter(sb, client_farewell_error);
|
||||
|
||||
Reference in New Issue
Block a user