Merge tag 'nfsd-6.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux

Pull nfsd fixes from Chuck Lever:

- Fix two async COPY bugs found during NFS bake-a-thon

- Fix an svcrdma memory leak

* tag 'nfsd-6.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
rpcrdma: Always release the rpcrdma_device's xa_array
NFSD: Never decrement pending_async_copies on error
NFSD: Initialize struct nfsd4_copy earlier

+5 -6
+4 -6
fs/nfsd/nfs4proc.c
··· 1841 1841 if (!async_copy) 1842 1842 goto out_err; 1843 1843 async_copy->cp_nn = nn; 1844 - /* Arbitrary cap on number of pending async copy operations */ 1845 - if (atomic_inc_return(&nn->pending_async_copies) > 1846 - (int)rqstp->rq_pool->sp_nrthreads) { 1847 - atomic_dec(&nn->pending_async_copies); 1848 - goto out_err; 1849 - } 1850 1844 INIT_LIST_HEAD(&async_copy->copies); 1851 1845 refcount_set(&async_copy->refcount, 1); 1846 + /* Arbitrary cap on number of pending async copy operations */ 1847 + if (atomic_inc_return(&nn->pending_async_copies) > 1848 + (int)rqstp->rq_pool->sp_nrthreads) 1849 + goto out_err; 1852 1850 async_copy->cp_src = kmalloc(sizeof(*async_copy->cp_src), GFP_KERNEL); 1853 1851 if (!async_copy->cp_src) 1854 1852 goto out_err;
+1
net/sunrpc/xprtrdma/ib_client.c
··· 153 153 } 154 154 155 155 trace_rpcrdma_client_remove_one_done(device); 156 + xa_destroy(&rd->rd_xa); 156 157 kfree(rd); 157 158 } 158 159