mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
Merge 8642174b52 ("Merge tag 'iomap-5.19-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux") into android-mainline
Steps on the way to 5.19-rc1 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I85f7e48356c584082850c2d54ddbc4de0cbea49b
This commit is contained in:
@@ -531,7 +531,8 @@ iomap_write_failed(struct inode *inode, loff_t pos, unsigned len)
|
||||
* write started inside the existing inode size.
|
||||
*/
|
||||
if (pos + len > i_size)
|
||||
truncate_pagecache_range(inode, max(pos, i_size), pos + len);
|
||||
truncate_pagecache_range(inode, max(pos, i_size),
|
||||
pos + len - 1);
|
||||
}
|
||||
|
||||
static int iomap_read_folio_sync(loff_t block_start, struct folio *folio,
|
||||
@@ -733,7 +734,7 @@ static size_t iomap_write_end(struct iomap_iter *iter, loff_t pos, size_t len,
|
||||
folio_put(folio);
|
||||
|
||||
if (ret < len)
|
||||
iomap_write_failed(iter->inode, pos, len);
|
||||
iomap_write_failed(iter->inode, pos + ret, len - ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1386,7 +1387,6 @@ iomap_writepage_map(struct iomap_writepage_ctx *wpc,
|
||||
if (wpc->ops->discard_folio)
|
||||
wpc->ops->discard_folio(folio, pos);
|
||||
if (!count) {
|
||||
folio_clear_uptodate(folio);
|
||||
folio_unlock(folio);
|
||||
goto done;
|
||||
}
|
||||
|
||||
@@ -464,7 +464,7 @@ xfs_discard_folio(
|
||||
int error;
|
||||
|
||||
if (xfs_is_shutdown(mp))
|
||||
goto out_invalidate;
|
||||
return;
|
||||
|
||||
xfs_alert_ratelimited(mp,
|
||||
"page discard on page "PTR_FMT", inode 0x%llx, pos %llu.",
|
||||
@@ -474,8 +474,6 @@ xfs_discard_folio(
|
||||
i_blocks_per_folio(inode, folio) - pageoff_fsb);
|
||||
if (error && !xfs_is_shutdown(mp))
|
||||
xfs_alert(mp, "page discard unable to remove delalloc mapping.");
|
||||
out_invalidate:
|
||||
iomap_invalidate_folio(folio, offset, folio_size(folio) - offset);
|
||||
}
|
||||
|
||||
static const struct iomap_writeback_ops xfs_writeback_ops = {
|
||||
|
||||
Reference in New Issue
Block a user