Il Ven 30 Set 2022, 13:09 Roberto A. Foglietta <roberto.foglietta@gmail.com> ha scritto:

Third: The mount point (/tmp/btrfs) is never cleaned up in the Robertos
patch.

I do umount but NOT rmdir because if for some reason umount fails (expecially in combination with a bug that do not let the error code be returned, I saw in busybox) I am going to remove the filesystem content. Moreover, polluting the /tmp is usually not an issue.

Two toughts ecollided in my head: 

1. do not run rm -rf on a dir that can contain a umounted filesystem 

2. just in case do rmdir that will fail and do not harm the content

  The result was quite curios: I the doubt I do not do anything but polluting /tmp!