Closed ryancaicse closed 3 years ago
For correctness we could certainly add a REDFS_UNLOCK() before the exit() call. However as the red_umount() call just failed we are already in a pretty bad state here. Note that if we change things here we should also change things in fuse_red_init() for coherency. Obviously, in a Unix/Posix/Linux system resource cleaning in an exit() path is not strictly necessary (but it doesn't hurt).
@jcdubois OK, thank you very much
Merged commit from @jcdubois, closing.
Hi developers, in the below codes, the lock
REDFS_LOCK();
could be not released before program's exitexit(1)
; . I think there is no harm to writeREDFS_UNLOCK();
before theexit(1)
for better resource management and code symmetry. Thanks!https://github.com/datalightinc/reliance-edge/blob/b91bff1aa3c9b545b5bf289b76de5e74ea4fcfd4/os/linux/tools/fuse.c#L955-L968