Skip to content

Commit 3e5e6c9

Browse files
committed
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
2 parents f6a7b4e + 63a8158 commit 3e5e6c9

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

fs/nfsd/nfs4proc.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,14 +1841,12 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
18411841
if (!async_copy)
18421842
goto out_err;
18431843
async_copy->cp_nn = nn;
1844+
INIT_LIST_HEAD(&async_copy->copies);
1845+
refcount_set(&async_copy->refcount, 1);
18441846
/* Arbitrary cap on number of pending async copy operations */
18451847
if (atomic_inc_return(&nn->pending_async_copies) >
1846-
(int)rqstp->rq_pool->sp_nrthreads) {
1847-
atomic_dec(&nn->pending_async_copies);
1848+
(int)rqstp->rq_pool->sp_nrthreads)
18481849
goto out_err;
1849-
}
1850-
INIT_LIST_HEAD(&async_copy->copies);
1851-
refcount_set(&async_copy->refcount, 1);
18521850
async_copy->cp_src = kmalloc(sizeof(*async_copy->cp_src), GFP_KERNEL);
18531851
if (!async_copy->cp_src)
18541852
goto out_err;

net/sunrpc/xprtrdma/ib_client.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ static void rpcrdma_remove_one(struct ib_device *device,
153153
}
154154

155155
trace_rpcrdma_client_remove_one_done(device);
156+
xa_destroy(&rd->rd_xa);
156157
kfree(rd);
157158
}
158159

0 commit comments

Comments
 (0)