]> git.karo-electronics.de Git - linux-beck.git/commitdiff
NFSD: Using free_conn free connection
authorKinglong Mee <kinglongmee@gmail.com>
Mon, 24 Mar 2014 03:56:59 +0000 (11:56 +0800)
committerJ. Bruce Fields <bfields@redhat.com>
Sat, 29 Mar 2014 01:23:40 +0000 (21:23 -0400)
Connection from alloc_conn must be freed through free_conn,
otherwise, the reference of svc_xprt will never be put.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c

index 7415eac36501120d1c2fff8fd4b2afe7016e0b09..5a9588e55f2eb27511f00698fdf296c59f5dc866 100644 (file)
@@ -2287,7 +2287,8 @@ out:
        if (!list_empty(&clp->cl_revoked))
                seq->status_flags |= SEQ4_STATUS_RECALLABLE_STATE_REVOKED;
 out_no_session:
-       kfree(conn);
+       if (conn)
+               free_conn(conn);
        spin_unlock(&nn->client_lock);
        return status;
 out_put_session: