mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
Merge tag 'nfs-for-5.9-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client bugfixes from Trond Myklebust: - Fix an NFS/RDMA resource leak - Fix the error handling during delegation recall - NFSv4.0 needs to return the delegation on a zero-stateid SETATTR - Stop printk reading past end of string * tag 'nfs-for-5.9-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: SUNRPC: stop printk reading past end of string NFS: Zero-stateid SETATTR should first return delegation NFSv4.1 handle ERR_DELAY error reclaiming locking state on delegation recall xprtrdma: Release in-flight MRs on disconnect
This commit is contained in:
@@ -3293,8 +3293,10 @@ static int _nfs4_do_setattr(struct inode *inode,
|
|||||||
|
|
||||||
/* Servers should only apply open mode checks for file size changes */
|
/* Servers should only apply open mode checks for file size changes */
|
||||||
truncate = (arg->iap->ia_valid & ATTR_SIZE) ? true : false;
|
truncate = (arg->iap->ia_valid & ATTR_SIZE) ? true : false;
|
||||||
if (!truncate)
|
if (!truncate) {
|
||||||
|
nfs4_inode_make_writeable(inode);
|
||||||
goto zero_stateid;
|
goto zero_stateid;
|
||||||
|
}
|
||||||
|
|
||||||
if (nfs4_copy_delegation_stateid(inode, FMODE_WRITE, &arg->stateid, &delegation_cred)) {
|
if (nfs4_copy_delegation_stateid(inode, FMODE_WRITE, &arg->stateid, &delegation_cred)) {
|
||||||
/* Use that stateid */
|
/* Use that stateid */
|
||||||
@@ -7298,7 +7300,12 @@ int nfs4_lock_delegation_recall(struct file_lock *fl, struct nfs4_state *state,
|
|||||||
err = nfs4_set_lock_state(state, fl);
|
err = nfs4_set_lock_state(state, fl);
|
||||||
if (err != 0)
|
if (err != 0)
|
||||||
return err;
|
return err;
|
||||||
err = _nfs4_do_setlk(state, F_SETLK, fl, NFS_LOCK_NEW);
|
do {
|
||||||
|
err = _nfs4_do_setlk(state, F_SETLK, fl, NFS_LOCK_NEW);
|
||||||
|
if (err != -NFS4ERR_DELAY)
|
||||||
|
break;
|
||||||
|
ssleep(1);
|
||||||
|
} while (err == -NFS4ERR_DELAY);
|
||||||
return nfs4_handle_delegation_recall_error(server, state, stateid, fl, err);
|
return nfs4_handle_delegation_recall_error(server, state, stateid, fl, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -982,8 +982,8 @@ static int rpcb_dec_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr,
|
|||||||
p = xdr_inline_decode(xdr, len);
|
p = xdr_inline_decode(xdr, len);
|
||||||
if (unlikely(p == NULL))
|
if (unlikely(p == NULL))
|
||||||
goto out_fail;
|
goto out_fail;
|
||||||
dprintk("RPC: %5u RPCB_%s reply: %s\n", req->rq_task->tk_pid,
|
dprintk("RPC: %5u RPCB_%s reply: %*pE\n", req->rq_task->tk_pid,
|
||||||
req->rq_task->tk_msg.rpc_proc->p_name, (char *)p);
|
req->rq_task->tk_msg.rpc_proc->p_name, len, (char *)p);
|
||||||
|
|
||||||
if (rpc_uaddr2sockaddr(req->rq_xprt->xprt_net, (char *)p, len,
|
if (rpc_uaddr2sockaddr(req->rq_xprt->xprt_net, (char *)p, len,
|
||||||
sap, sizeof(address)) == 0)
|
sap, sizeof(address)) == 0)
|
||||||
|
@@ -933,6 +933,8 @@ static void rpcrdma_req_reset(struct rpcrdma_req *req)
|
|||||||
|
|
||||||
rpcrdma_regbuf_dma_unmap(req->rl_sendbuf);
|
rpcrdma_regbuf_dma_unmap(req->rl_sendbuf);
|
||||||
rpcrdma_regbuf_dma_unmap(req->rl_recvbuf);
|
rpcrdma_regbuf_dma_unmap(req->rl_recvbuf);
|
||||||
|
|
||||||
|
frwr_reset(req);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ASSUMPTION: the rb_allreqs list is stable for the duration,
|
/* ASSUMPTION: the rb_allreqs list is stable for the duration,
|
||||||
|
Reference in New Issue
Block a user