Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759678Ab2EDUn4 (ORCPT ); Fri, 4 May 2012 16:43:56 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:61380 "EHLO mail-pz0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932141Ab2EDUnz (ORCPT ); Fri, 4 May 2012 16:43:55 -0400 Message-Id: <20120504204224.522108563@linuxfoundation.org> User-Agent: quilt/0.60-19.1 Date: Fri, 04 May 2012 13:42:26 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Trond Myklebust Subject: [ 02/75] NFSv4: Ensure that the LOCK code sets exception->inode In-Reply-To: <20120504204258.GA12552@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1707 Lines: 57 3.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Trond Myklebust commit 05ffe24f5290dc095f98fbaf84afe51ef404ccc5 upstream. All callers of nfs4_handle_exception() that need to handle NFS4ERR_OPENMODE correctly should set exception->inode Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- fs/nfs/nfs4proc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -4460,7 +4460,9 @@ static int _nfs4_do_setlk(struct nfs4_st 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 { @@ -4478,7 +4480,9 @@ static int nfs4_lock_reclaim(struct nfs4 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); @@ -4558,6 +4562,7 @@ static int nfs4_proc_setlk(struct nfs4_s { struct nfs4_exception exception = { .state = state, + .inode = state->inode, }; int err; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/