cifs: return the more nuanced writeback error on close()
authorChenXiaoSong <chenxiaosong2@huawei.com>
Wed, 18 May 2022 14:56:49 +0000 (22:56 +0800)
committerSteve French <stfrench@microsoft.com>
Sun, 22 May 2022 05:01:06 +0000 (00:01 -0500)
commit2b058acecf56f6b8fac781911a683219b9ca3b7b
tree61efe3717fc4c24d15c0e86440bc65a5a442db2c
parentfb253d5ba3fcbd3b4216bcc37d019926f5e32ebb
cifs: return the more nuanced writeback error on close()

As filemap_check_errors() only report -EIO or -ENOSPC, we return more nuanced
writeback error -(file->f_mapping->wb_err & MAX_ERRNO).

  filemap_write_and_wait
    filemap_write_and_wait_range
      filemap_check_errors
        -ENOSPC or -EIO
  filemap_check_wb_err
    errseq_check
      return -(file->f_mapping->wb_err & MAX_ERRNO)

Signed-off-by: ChenXiaoSong <chenxiaosong2@huawei.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/file.c