Btrfs: Don't allow releasepage to succeed if EXTENT_ORDERED is set
Signed-off-by: Chris Mason <chris.mason@oracle.com>
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index feff16cb..3153b4f 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2542,7 +2542,8 @@
u64 end = start + PAGE_CACHE_SIZE - 1;
int ret = 1;
- if (test_range_bit(tree, start, end, EXTENT_IOBITS, 0))
+ if (test_range_bit(tree, start, end,
+ EXTENT_IOBITS | EXTENT_ORDERED, 0))
ret = 0;
else {
if ((mask & GFP_NOFS) == GFP_NOFS)