Commit 4c861141 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'iomap-6.1-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull iomap updates from Darrick Wong:
 "It's pretty quiet this time around -- a UAF bugfix and a new
  tracepoint so we can watch file writeback:

   - Fix a UAF bug when recording writeback mapping errors

   - Add a tracepoint so that we can monitor writeback mappings"

* tag 'iomap-6.1-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  iomap: add a tracepoint for mappings returned by map_blocks
  iomap: iomap: fix memory corruption when recording errors during writeback
parents bc32a633 adc9c2e5
...@@ -1360,6 +1360,7 @@ iomap_writepage_map(struct iomap_writepage_ctx *wpc, ...@@ -1360,6 +1360,7 @@ iomap_writepage_map(struct iomap_writepage_ctx *wpc,
error = wpc->ops->map_blocks(wpc, inode, pos); error = wpc->ops->map_blocks(wpc, inode, pos);
if (error) if (error)
break; break;
trace_iomap_writepage_map(inode, &wpc->iomap);
if (WARN_ON_ONCE(wpc->iomap.type == IOMAP_INLINE)) if (WARN_ON_ONCE(wpc->iomap.type == IOMAP_INLINE))
continue; continue;
if (wpc->iomap.type == IOMAP_HOLE) if (wpc->iomap.type == IOMAP_HOLE)
...@@ -1421,7 +1422,7 @@ iomap_writepage_map(struct iomap_writepage_ctx *wpc, ...@@ -1421,7 +1422,7 @@ iomap_writepage_map(struct iomap_writepage_ctx *wpc,
if (!count) if (!count)
folio_end_writeback(folio); folio_end_writeback(folio);
done: done:
mapping_set_error(folio->mapping, error); mapping_set_error(inode->i_mapping, error);
return error; return error;
} }
......
...@@ -148,6 +148,7 @@ DEFINE_EVENT(iomap_class, name, \ ...@@ -148,6 +148,7 @@ DEFINE_EVENT(iomap_class, name, \
TP_ARGS(inode, iomap)) TP_ARGS(inode, iomap))
DEFINE_IOMAP_EVENT(iomap_iter_dstmap); DEFINE_IOMAP_EVENT(iomap_iter_dstmap);
DEFINE_IOMAP_EVENT(iomap_iter_srcmap); DEFINE_IOMAP_EVENT(iomap_iter_srcmap);
DEFINE_IOMAP_EVENT(iomap_writepage_map);
TRACE_EVENT(iomap_iter, TRACE_EVENT(iomap_iter,
TP_PROTO(struct iomap_iter *iter, const void *ops, TP_PROTO(struct iomap_iter *iter, const void *ops,
......
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