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 */
|
||||
truncate = (arg->iap->ia_valid & ATTR_SIZE) ? true : false;
|
||||
if (!truncate)
|
||||
if (!truncate) {
|
||||
nfs4_inode_make_writeable(inode);
|
||||
goto zero_stateid;
|
||||
}
|
||||
|
||||
if (nfs4_copy_delegation_stateid(inode, FMODE_WRITE, &arg->stateid, &delegation_cred)) {
|
||||
/* 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);
|
||||
if (err != 0)
|
||||
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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user