umount.nfs: umount doesn't recognize a busy file system
Subsystems (2)
PATCH 13/14 umount.nfs: umount doesn't recognize a busy file system
umount.nfs shouldn't remove a busy file system from /etc/mtab, and should report and return an error. I also added an extra "goto" to make the flow of control more clear, and to reduce the chance that a future change in this logic will break it.
Signed-off-by Chuck Lever <[email protected]>
---
utils/mount/nfsumount.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-)
utils/mount/nfsumount.c +7 -3
@@ -102,10 +102,14 @@ static int del_mtab(const char *spec, const char *node) }else res =umount (node); -if (res <0 && remount && errno ==EBUSY && spec) { - res =try_remount (spec, node); -if (!res) +if (res <0 ) { +if (remount && errno ==EBUSY && spec) { + res =try_remount (spec, node); +if (res) + goto writemtab;return 0 ; + }else + umnt_err = errno; }if (res >=0 ) {
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs