From: Trond Myklebust Date: Wed, 29 May 2013 19:36:40 +0000 (-0400) Subject: NFSv4: Fix a thinko in nfs4_try_open_cached X-Git-Tag: v4.0~3722^2~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f448badd34700ae728a32ba024249626d49c10e1;p=platform%2Fkernel%2Flinux-amlogic.git NFSv4: Fix a thinko in nfs4_try_open_cached 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 --- diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 4e2fe71..d7ba561 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -1078,7 +1078,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;