From: Trond Myklebust Date: Sat, 20 Apr 2013 05:30:53 +0000 (-0400) Subject: NFSv4: Ensure the LOCK call cannot use the delegation stateid X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=8e472f33b5ba742f9bfcf16f0328f5a7842b32d1;p=openwrt%2Fstaging%2Fblogic.git NFSv4: Ensure the LOCK call cannot use the delegation stateid Defensive patch to ensure that we copy the state->open_stateid, which can never be set to the delegation stateid. Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 39849360f9f6..ed01a66dc391 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -4793,7 +4793,7 @@ static void nfs4_lock_prepare(struct rpc_task *task, void *calldata) if (nfs_wait_on_sequence(data->arg.open_seqid, task) != 0) { goto out_release_lock_seqid; } - data->arg.open_stateid = &state->stateid; + data->arg.open_stateid = &state->open_stateid; data->arg.new_lock_owner = 1; data->res.open_seqid = data->arg.open_seqid; } else