提交 4a7f4e88 编写于 作者: M Miklos Szeredi

fuse: use filemap_check_errors()

Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
上级 d72d9e2a
......@@ -417,12 +417,7 @@ static int fuse_flush(struct file *file, fl_owner_t id)
fuse_sync_writes(inode);
inode_unlock(inode);
if (test_bit(AS_ENOSPC, &file->f_mapping->flags) &&
test_and_clear_bit(AS_ENOSPC, &file->f_mapping->flags))
err = -ENOSPC;
if (test_bit(AS_EIO, &file->f_mapping->flags) &&
test_and_clear_bit(AS_EIO, &file->f_mapping->flags))
err = -EIO;
err = filemap_check_errors(file->f_mapping);
if (err)
return err;
......@@ -477,12 +472,7 @@ int fuse_fsync_common(struct file *file, loff_t start, loff_t end,
* filemap_write_and_wait_range() does not catch errors.
* We have to do this directly after fuse_sync_writes()
*/
if (test_bit(AS_ENOSPC, &file->f_mapping->flags) &&
test_and_clear_bit(AS_ENOSPC, &file->f_mapping->flags))
err = -ENOSPC;
if (test_bit(AS_EIO, &file->f_mapping->flags) &&
test_and_clear_bit(AS_EIO, &file->f_mapping->flags))
err = -EIO;
err = filemap_check_errors(file->f_mapping);
if (err)
goto out;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册