Commit f20ac7ab authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Dave Chinner

iomap: mark ->iomap_end as optional

No need to implement it for read-only mappings.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent ac2dc058
...@@ -84,8 +84,11 @@ iomap_apply(struct inode *inode, loff_t pos, loff_t length, unsigned flags, ...@@ -84,8 +84,11 @@ iomap_apply(struct inode *inode, loff_t pos, loff_t length, unsigned flags,
* Now the data has been copied, commit the range we've copied. This * Now the data has been copied, commit the range we've copied. This
* should not fail unless the filesystem has had a fatal error. * should not fail unless the filesystem has had a fatal error.
*/ */
ret = ops->iomap_end(inode, pos, length, written > 0 ? written : 0, if (ops->iomap_end) {
flags, &iomap); ret = ops->iomap_end(inode, pos, length,
written > 0 ? written : 0,
flags, &iomap);
}
return written ? written : ret; return written ? written : ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment