]> www.infradead.org Git - users/hch/xfs.git/commitdiff
iomap: don't merge ioends with mismatching fs private flag
authorChristoph Hellwig <hch@lst.de>
Fri, 24 Nov 2023 18:51:38 +0000 (19:51 +0100)
committerChristoph Hellwig <hch@lst.de>
Tue, 5 Nov 2024 08:26:39 +0000 (09:26 +0100)
If the file system set it's private flag on one ioend but not the other
we better don't merge the two.

Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/iomap/buffered-io.c

index b4e309aa1043824cbcafa5fe931b74812c4f22b7..160c184cf86063bed5bbfd59b5bdc562c396e24f 100644 (file)
@@ -1620,8 +1620,8 @@ iomap_ioend_can_merge(struct iomap_ioend *ioend, struct iomap_ioend *next)
                return false;
        if (next->io_flags & IOMAP_F_BOUNDARY)
                return false;
-       if ((ioend->io_flags & IOMAP_F_SHARED) ^
-           (next->io_flags & IOMAP_F_SHARED))
+       if ((ioend->io_flags & (IOMAP_F_SHARED | IOMAP_F_PRIVATE)) !=
+           (next->io_flags & (IOMAP_F_SHARED | IOMAP_F_PRIVATE)))
                return false;
        if ((ioend->io_type == IOMAP_UNWRITTEN) ^
            (next->io_type == IOMAP_UNWRITTEN))