fs: completely ignore unknown open flags
authorChristoph Hellwig <hch@lst.de>
Thu, 27 Apr 2017 07:42:25 +0000 (09:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Jul 2017 13:01:02 +0000 (15:01 +0200)
commit26ff065b8401efd17cabf094f82f611f98acf022
tree825aac224b62924d3dffc521ab224b150ec58adb
parent6efb1b0b6c82c036bfc9f475ff7f06ad1a2fa241
fs: completely ignore unknown open flags

commit 629e014bb8349fcf7c1e4df19a842652ece1c945 upstream.

Currently we just stash anything we got into file->f_flags, and the
report it in fcntl(F_GETFD).  This patch just clears out all unknown
flags so that we don't pass them to the fs or report them.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/open.c