Message ID | f2d48b67e911de7a8b89025b25d3ab97f397ba8f.1418329650.git.bcodding@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c index c51fb4d..c2e4767 100644 --- a/fs/nfs/nfs4file.c +++ b/fs/nfs/nfs4file.c @@ -37,6 +37,10 @@ nfs4_file_open(struct inode *inode, struct file *filp) dprintk("NFS: open file(%pd2)\n", dentry); + err = nfs_check_flags(openflags); + if (err) + return err; + if ((openflags & O_ACCMODE) == 3) openflags--;
Fix another path for: 9597c13b nfs: verify open flags before allowing an atomic open which forbade the NFSv4 open for O_DIRECT|O_APPEND in nfs_atomic_open(). That code path is missed when a cached positive dentry exists; nfs4_file_open() is used instead. Duplicate the forbid in nfs4_file_open(). Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Cc: Jeff Layton <jeff.layton@primarydata.com> --- fs/nfs/nfs4file.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)