Return-Path: Message-Id: <20130703184051.872343880@goodmis.org> Date: Wed, 03 Jul 2013 14:39:41 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Trond Myklebust Subject: [044/141] NFSv4: Fix a thinko in nfs4_try_open_cached References: <20130703183857.307196999@goodmis.org> Content-Disposition: inline; filename=0044-NFSv4-Fix-a-thinko-in-nfs4_try_open_cached.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.6.11.6 stable review patch. If anyone has any objections, please let me know. ------------------ From: Trond Myklebust [ Upstream commit f448badd34700ae728a32ba024249626d49c10e1 ] We need to pass the full open mode flags to nfs_may_open() when doing a delegated open. Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org Signed-off-by: Steven Rostedt --- fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 4d135ef..24affff 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -1074,7 +1074,7 @@ static struct nfs4_state *nfs4_try_open_cached(struct nfs4_opendata *opendata) struct nfs4_state *state = opendata->state; struct nfs_inode *nfsi = NFS_I(state->inode); struct nfs_delegation *delegation; - int open_mode = opendata->o_arg.open_flags & (O_EXCL|O_TRUNC); + int open_mode = opendata->o_arg.open_flags; fmode_t fmode = opendata->o_arg.fmode; nfs4_stateid stateid; int ret = -EAGAIN; -- 1.7.10.4