• Stanislav Kinsbursky's avatar
    NFS: suppressing showing of default mount port value in /proc fixed · aa699473
    Stanislav Kinsbursky authored
    Update: added check for zero value as it was before (note: can't simply check
    mountd_port for positive value because it's typeof unsigned short)
    
    Default value for mount server port is set to NFS_UNSPEC_PORT (-1) and will not
    be changed during parsing mount options for mound data version 6. This default
    value will be showed for mountport in /proc/mounts always since current default
    check is for zero value. This small mistake leads to big problem, because
    during umount.nfs execution from old user-space utils (at least nfs-utils
    1.0.9) this value will be used as the server port to connect to. This request
    will be rejected (since port is 65535) and thus nfs mount point can't be
    unmounted.
    
    Note from Chuck Lever (chuck.lever@oracle.com): this is only possible if
    /etc/mtab is a link to /proc/mounts.  Not all systems have this configuration.
    Signed-off-by: default avatarStanislav Kinsbursky <skinsbursky@parallels.com>
    Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
    aa699473
super.c 78.8 KB