mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
orangefs_super: don't wait on service operation on system shutdown.
If someone reboots the system while an orangefs filesystem is still mounted, don't wait for the completion of an unmount service operation that's never going to return. Signed-off-by: Mike Marshall <hubcap@omnibond.com> Link: https://patch.msgid.link/20260915162637.499735-1-hubcap@kernel.org Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
parent
392f5390d5
commit
6c21c52cea
|
|
@ -383,6 +383,24 @@ static int orangefs_unmount(int id, __s32 fs_id, const char *devname)
|
|||
{
|
||||
struct orangefs_kernel_op_s *op;
|
||||
int r;
|
||||
|
||||
/*
|
||||
* If someone reboots linux without unmounting orangefs first,
|
||||
* don't bother firing off an unmount service operation that
|
||||
* will never complete, or the whole system shutdown
|
||||
* stalls for ORANGEFS_DEFAULT_OP_TIMEOUT_SECS.
|
||||
*/
|
||||
|
||||
if (!__is_daemon_in_service() ||
|
||||
system_state == SYSTEM_HALT ||
|
||||
system_state == SYSTEM_POWER_OFF ||
|
||||
system_state == SYSTEM_RESTART) {
|
||||
gossip_debug(GOSSIP_SUPER_DEBUG,
|
||||
"%s: dirty unmount.\n",
|
||||
__func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
op = op_alloc(ORANGEFS_VFS_OP_FS_UMOUNT);
|
||||
if (!op)
|
||||
return -ENOMEM;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user