HomeFreeBSD

mount_nfs: Only create a mounttab file entry is nmount(2) succeeds

Description

mount_nfs: Only create a mounttab file entry is nmount(2) succeeds

mount_nfs creates entries in the mounttab file and umount removes
them. Entries in the mounttab file ae used by rpc.umntall to
notify the NFS server that NFSv3 entries need to be removed when
they have not been removed by umount.

Without this patch, an enty will be created in the mounttab file,
even if the nmount(2) syscall fails for the mount. This patch
modifies the code so that the mounttab entry is only created
after nmount(2) succeeds.

This change only affects NFSv3 and only affects how showmount
displays NFSv3 mounts.

MFC after: 2 weeks

Details

Provenance
rmacklemAuthored on May 28 2022, 10:48 PM
Parents
rG6a5eebc190ab: Apply clang fix for assertion failure building putty 0.77 on i386
Branches
Unknown
Tags
Unknown