• Z
    NFS4: Fix v4.0 client state corruption when mount · 8683a919
    ZhangXiaoxu 提交于
    mainline inclusion
    from mainline-5.2
    commit f02f3755dbd14fb935d24b14650fff9ba92243b8
    category: bugfix
    bugzilla: 15770
    CVE: NA
    
    -------------------------------------------------
    
    stat command with soft mount never return after server is stopped.
    
    When alloc a new client, the state of the client will be set to
    NFS4CLNT_LEASE_EXPIRED.
    
    When the server is stopped, the state manager will work, and accord
    the state to recover. But the state is NFS4CLNT_LEASE_EXPIRED, it
    will drain the slot table and lead other task to wait queue, until
    the client recovered. Then the stat command is hung.
    
    When discover server trunking, the client will renew the lease,
    but check the client state, it lead the client state corruption.
    
    So, we need to call state manager to recover it when detect server
    ip trunking.
    Signed-off-by: NZhangXiaoxu <zhangxiaoxu5@huawei.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
    Reviewed-by: NHou Tao <houtao1@huawei.com>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    8683a919
nfs4state.c 68.4 KB