Skip to content

Commit

Permalink
NFSv4: Ensure that the LOCK code sets exception->inode
Browse files Browse the repository at this point in the history
All callers of nfs4_handle_exception() that need to handle
NFS4ERR_OPENMODE correctly should set exception->inode

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Apr 19, 2012
1 parent ca138f3 commit 05ffe24
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
struct nfs_server *server = NFS_SERVER(state->inode);
struct nfs4_exception exception = { };
struct nfs4_exception exception = {
.inode = state->inode,
};
int err;

do {
Expand All @@ -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)
{
struct nfs_server *server = NFS_SERVER(state->inode);
struct nfs4_exception exception = { };
struct nfs4_exception exception = {
.inode = state->inode,
};
int err;

err = nfs4_set_lock_state(state, request);
Expand Down Expand Up @@ -4676,6 +4680,7 @@ static int nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *
{
struct nfs4_exception exception = {
.state = state,
.inode = state->inode,
};
int err;

Expand Down

0 comments on commit 05ffe24

Please sign in to comment.