Home
last modified time | relevance | path

Searched hist:"9597 c13b" (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/fs/nfs/
H A Dnfs4file.c18a60089 Thu Jun 25 08:25:50 CDT 2015 Benjamin Coddington <bcodding@redhat.com> nfs: verify open flags before allowing open

Commit 9597c13b forbade opens with O_APPEND|O_DIRECT for NFSv4:

nfs: verify open flags before allowing an atomic open

Currently, you can open a NFSv4 file with O_APPEND|O_DIRECT, but cannot
fcntl(F_SETFL,...) with those flags. This flag combination is explicitly
forbidden on NFSv3 opens, and it seems like it should also be on NFSv4.

However, you can still open a file with O_DIRECT|O_APPEND if there exists a
cached dentry for the file because nfs4_file_open() is used instead of
nfs_atomic_open() and the check is bypassed. Add the check in
nfs4_file_open() as well.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
18a60089 Thu Jun 25 08:25:50 CDT 2015 Benjamin Coddington <bcodding@redhat.com> nfs: verify open flags before allowing open

Commit 9597c13b forbade opens with O_APPEND|O_DIRECT for NFSv4:

nfs: verify open flags before allowing an atomic open

Currently, you can open a NFSv4 file with O_APPEND|O_DIRECT, but cannot
fcntl(F_SETFL,...) with those flags. This flag combination is explicitly
forbidden on NFSv3 opens, and it seems like it should also be on NFSv4.

However, you can still open a file with O_DIRECT|O_APPEND if there exists a
cached dentry for the file because nfs4_file_open() is used instead of
nfs_atomic_open() and the check is bypassed. Add the check in
nfs4_file_open() as well.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
H A Ddir.c9597c13b Fri Aug 02 10:39:32 CDT 2013 Jeff Layton <jlayton@redhat.com> nfs: verify open flags before allowing an atomic open

Currently, you can open a NFSv4 file with O_APPEND|O_DIRECT, but cannot
fcntl(F_SETFL,...) with those flags. This flag combination is explicitly
forbidden on NFSv3 opens, and it seems like it should also be on NFSv4.

Reported-by: Chao Ye <cye@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
9597c13b Fri Aug 02 10:39:32 CDT 2013 Jeff Layton <jlayton@redhat.com> nfs: verify open flags before allowing an atomic open

Currently, you can open a NFSv4 file with O_APPEND|O_DIRECT, but cannot
fcntl(F_SETFL,...) with those flags. This flag combination is explicitly
forbidden on NFSv3 opens, and it seems like it should also be on NFSv4.

Reported-by: Chao Ye <cye@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>