mm: export filemap_check_errors() to modules

Can be used by fuse, btrfs and f2fs to replace opencoded variants.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
Miklos Szeredi 2016-07-29 14:10:57 +02:00
parent 9446385f05
commit d72d9e2a5d
2 changed files with 3 additions and 1 deletions

View File

@ -2507,6 +2507,7 @@ extern int __filemap_fdatawrite_range(struct address_space *mapping,
loff_t start, loff_t end, int sync_mode); loff_t start, loff_t end, int sync_mode);
extern int filemap_fdatawrite_range(struct address_space *mapping, extern int filemap_fdatawrite_range(struct address_space *mapping,
loff_t start, loff_t end); loff_t start, loff_t end);
extern int filemap_check_errors(struct address_space *mapping);
extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end, extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end,
int datasync); int datasync);

View File

@ -254,7 +254,7 @@ void delete_from_page_cache(struct page *page)
} }
EXPORT_SYMBOL(delete_from_page_cache); EXPORT_SYMBOL(delete_from_page_cache);
static int filemap_check_errors(struct address_space *mapping) int filemap_check_errors(struct address_space *mapping)
{ {
int ret = 0; int ret = 0;
/* Check for outstanding write errors */ /* Check for outstanding write errors */
@ -266,6 +266,7 @@ static int filemap_check_errors(struct address_space *mapping)
ret = -EIO; ret = -EIO;
return ret; return ret;
} }
EXPORT_SYMBOL(filemap_check_errors);
/** /**
* __filemap_fdatawrite_range - start writeback on mapping dirty pages in range * __filemap_fdatawrite_range - start writeback on mapping dirty pages in range