Commit 05ffe24f authored by Trond Myklebust's avatar Trond Myklebust

NFSv4: Ensure that the LOCK code sets exception->inode

All callers of nfs4_handle_exception() that need to handle
NFS4ERR_OPENMODE correctly should set exception->inode
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
parent ca138f36
...@@ -4558,7 +4558,9 @@ static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *f ...@@ -4558,7 +4558,9 @@ static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *f
static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request) static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request)
{ {
struct nfs_server *server = NFS_SERVER(state->inode); struct nfs_server *server = NFS_SERVER(state->inode);
struct nfs4_exception exception = { }; struct nfs4_exception exception = {
.inode = state->inode,
};
int err; int err;
do { do {
...@@ -4576,7 +4578,9 @@ static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request ...@@ -4576,7 +4578,9 @@ static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request
static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request) static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request)
{ {
struct nfs_server *server = NFS_SERVER(state->inode); struct nfs_server *server = NFS_SERVER(state->inode);
struct nfs4_exception exception = { }; struct nfs4_exception exception = {
.inode = state->inode,
};
int err; int err;
err = nfs4_set_lock_state(state, request); err = nfs4_set_lock_state(state, request);
...@@ -4676,6 +4680,7 @@ static int nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock * ...@@ -4676,6 +4680,7 @@ static int nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *
{ {
struct nfs4_exception exception = { struct nfs4_exception exception = {
.state = state, .state = state,
.inode = state->inode,
}; };
int err; int err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment