The writepage_io is not mandatory, e.g. my port of xfs to the extent_map
code does not have one for now. So handle a NULL pointer gracefully
here.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
continue;
}
clear_extent_dirty(tree, cur, cur + iosize - 1, GFP_NOFS);
- ret = tree->ops->writepage_io_hook(page, cur, cur + iosize - 1);
+ if (tree->ops && tree->ops->writepage_io_hook) {
+ ret = tree->ops->writepage_io_hook(page, cur,
+ cur + iosize - 1);
+ } else {
+ ret = 0;
+ }
if (ret)
SetPageError(page);
else {