generic: test reporting of wb errors via syncfs

Add a test for new syncfs error reporting behavior. When an inode fails
to be written back, ensure that we report an error to a subsequent call
to syncfs().

Because we don't want to grow struct file in order to support this, we
only do this if the file was opened with O_PATH flag.

Signed-off-by: Jeff Layton <>
3 files changed