[PATCH 3/4] NFSv4: Ensure that the LOCK code sets exception->inode
Luis Henriques
luis.henriques at canonical.com
Thu Apr 19 09:45:02 UTC 2012
From: Trond Myklebust <Trond.Myklebust at netapp.com>
BugLink: http://bugs.launchpad.net/bugs/974664
All callers of nfs4_handle_exception() that need to handle
NFS4ERR_OPENMODE correctly should set exception->inode
Signed-off-by: Trond Myklebust <Trond.Myklebust at netapp.com>
Cc: stable at vger.kernel.org [>= 3.3.1]
(cherry picked from commit 487790f27df9bb27d3400486bd021dd59edc7589 git://git.linux-nfs.org/projects/trondmy/linux-nfs.git)
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
fs/nfs/nfs4proc.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 979ccc3..39c9cd2 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4453,7 +4453,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 {
@@ -4471,7 +4473,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);
@@ -4551,6 +4555,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;
--
1.7.9.5
More information about the kernel-team
mailing list