NFSv4: Fix unnecessary delegation returns in nfs4_do_open
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 8 Jun 2012 14:58:09 +0000 (10:58 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 8 Jun 2012 15:08:42 +0000 (11:08 -0400)
While nfs4_do_open() expects the fmode argument to be restricted to
combinations of FMODE_READ and FMODE_WRITE, both nfs4_atomic_open()
and nfs4_proc_create will pass the nfs_open_context->mode,
which contains the full fmode_t.

This patch ensures that nfs4_do_open strips the other fmode_t bits,
fixing a problem in which the nfs4_do_open call would result in an
unnecessary delegation return.

Reported-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org

No differences found