file: consolidate fd cleanup classes using fdget_except

Currently, the fd, fd_except, and fd_raw cleanup classes all use separate init
functions, but fdget() and fdget_raw() can be replaced with fdget_except() with
negligible overhead.

The only complication is that we now need access to the definition of
FMODE_PATH in <linux/file.h>.  To make that definition available without
including <linux/fs.h>, split the fmode definitions off into a separate
<linux/fmode.h> header and include that in both places.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
5 files changed