Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 536ff0f8 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFSv4: Ensure we don't corrupt fl->fl_flags in nfs4_proc_unlck

parent 4a9af59f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3263,6 +3263,7 @@ static int nfs4_proc_unlck(struct nfs4_state *state, int cmd, struct file_lock *
	struct nfs4_lock_state *lsp;
	struct rpc_task *task;
	int status = 0;
	unsigned char fl_flags = request->fl_flags;

	status = nfs4_set_lock_state(state, request);
	/* Unlock _before_ we do the RPC call */
@@ -3286,6 +3287,7 @@ static int nfs4_proc_unlck(struct nfs4_state *state, int cmd, struct file_lock *
	status = nfs4_wait_for_completion_rpc_task(task);
	rpc_put_task(task);
out:
	request->fl_flags = fl_flags;
	return status;
}