diff options
Diffstat (limited to 'fs/nfs')
| -rw-r--r-- | fs/nfs/callback_xdr.c | 2 | ||||
| -rw-r--r-- | fs/nfs/client.c | 1 | ||||
| -rw-r--r-- | fs/nfs/delegation.c | 5 | ||||
| -rw-r--r-- | fs/nfs/localio.c | 7 | ||||
| -rw-r--r-- | fs/nfs/nfs42proc.c | 2 | ||||
| -rw-r--r-- | fs/nfs/nfs4state.c | 2 | 
6 files changed, 13 insertions, 6 deletions
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c index 6df77f008d3f..fdeb0b34a3d3 100644 --- a/fs/nfs/callback_xdr.c +++ b/fs/nfs/callback_xdr.c @@ -375,6 +375,8 @@ static __be32 decode_rc_list(struct xdr_stream *xdr,  	rc_list->rcl_nrefcalls = ntohl(*p++);  	if (rc_list->rcl_nrefcalls) { +		if (unlikely(rc_list->rcl_nrefcalls > xdr->buf->len)) +			goto out;  		p = xdr_inline_decode(xdr,  			     rc_list->rcl_nrefcalls * 2 * sizeof(uint32_t));  		if (unlikely(p == NULL)) diff --git a/fs/nfs/client.c b/fs/nfs/client.c index a1d21c4be0ac..114282398716 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -996,6 +996,7 @@ struct nfs_server *nfs_alloc_server(void)  	INIT_LIST_HEAD(&server->layouts);  	INIT_LIST_HEAD(&server->state_owners_lru);  	INIT_LIST_HEAD(&server->ss_copies); +	INIT_LIST_HEAD(&server->ss_src_copies);  	atomic_set(&server->active, 0); diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 20cb2008f9e4..035ba52742a5 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -1001,6 +1001,11 @@ void nfs_delegation_mark_returned(struct inode *inode,  	}  	nfs_mark_delegation_revoked(delegation); +	clear_bit(NFS_DELEGATION_RETURNING, &delegation->flags); +	spin_unlock(&delegation->lock); +	if (nfs_detach_delegation(NFS_I(inode), delegation, NFS_SERVER(inode))) +		nfs_put_delegation(delegation); +	goto out_rcu_unlock;  out_clear_returning:  	clear_bit(NFS_DELEGATION_RETURNING, &delegation->flags); diff --git a/fs/nfs/localio.c b/fs/nfs/localio.c index c29cdf51c458..d0aa680ec816 100644 --- a/fs/nfs/localio.c +++ b/fs/nfs/localio.c @@ -18,7 +18,6 @@  #include <net/addrconf.h>  #include <linux/nfs_common.h>  #include <linux/nfslocalio.h> -#include <linux/module.h>  #include <linux/bvec.h>  #include <linux/nfs.h> @@ -341,7 +340,7 @@ nfs_local_pgio_release(struct nfs_local_kiocb *iocb)  {  	struct nfs_pgio_header *hdr = iocb->hdr; -	nfs_to->nfsd_file_put_local(iocb->localio); +	nfs_to_nfsd_file_put_local(iocb->localio);  	nfs_local_iocb_free(iocb);  	nfs_local_hdr_release(hdr, hdr->task.tk_ops);  } @@ -622,7 +621,7 @@ int nfs_local_doio(struct nfs_client *clp, struct nfsd_file *localio,  	}  out:  	if (status != 0) { -		nfs_to->nfsd_file_put_local(localio); +		nfs_to_nfsd_file_put_local(localio);  		hdr->task.tk_status = status;  		nfs_local_hdr_release(hdr, call_ops);  	} @@ -673,7 +672,7 @@ nfs_local_release_commit_data(struct nfsd_file *localio,  		struct nfs_commit_data *data,  		const struct rpc_call_ops *call_ops)  { -	nfs_to->nfsd_file_put_local(localio); +	nfs_to_nfsd_file_put_local(localio);  	call_ops->rpc_call_done(&data->task, data);  	call_ops->rpc_release(data);  } diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c index 28704f924612..531c9c20ef1d 100644 --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -218,7 +218,7 @@ static int handle_async_copy(struct nfs42_copy_res *res,  	if (dst_server != src_server) {  		spin_lock(&src_server->nfs_client->cl_lock); -		list_add_tail(©->src_copies, &src_server->ss_copies); +		list_add_tail(©->src_copies, &src_server->ss_src_copies);  		spin_unlock(&src_server->nfs_client->cl_lock);  	} diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 581864a15888..dafd61186557 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -1585,7 +1585,7 @@ static void nfs42_complete_copies(struct nfs4_state_owner *sp, struct nfs4_state  			complete(©->completion);  		}  	} -	list_for_each_entry(copy, &sp->so_server->ss_copies, src_copies) { +	list_for_each_entry(copy, &sp->so_server->ss_src_copies, src_copies) {  		if ((test_bit(NFS_CLNT_SRC_SSC_COPY_STATE, &state->flags) &&  				!nfs4_stateid_match_other(&state->stateid,  				©->parent_src_state->stateid)))  | 
