OSDN Git Service

NFS: simplify check for freeing cn_resp
authorTom Rix <trix@redhat.com>
Mon, 17 Jan 2022 17:50:10 +0000 (09:50 -0800)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 25 Feb 2022 20:07:07 +0000 (15:07 -0500)
nfs42_files_from_same_server() is called to check if freeing
cn_resp is required, just do the free.

Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/nfs4file.c

index e79ae4c..ba11759 100644 (file)
@@ -180,8 +180,8 @@ retry:
        ret = nfs42_proc_copy(file_in, pos_in, file_out, pos_out, count,
                                nss, cnrs, sync);
 out:
-       if (!nfs42_files_from_same_server(file_in, file_out))
-               kfree(cn_resp);
+       kfree(cn_resp);
+
        if (ret == -EAGAIN)
                goto retry;
        return ret;