[PATCH] btrfs: Remove redundant nowait check in lock_extent_direct
From: Alexey Velichayshiy
Date: Sun Feb 22 2026 - 07:49:03 EST
The nowait flag is always false in this context, making the conditional
check unnecessary. Simplify the code by directly assigning -ENOTBLK.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Alexey Velichayshiy <a.velichayshiy@xxxxxxxxx>
---
fs/btrfs/direct-io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/direct-io.c b/fs/btrfs/direct-io.c
index 07e19e88ba4b..72a229c44833 100644
--- a/fs/btrfs/direct-io.c
+++ b/fs/btrfs/direct-io.c
@@ -107,7 +107,7 @@ static int lock_extent_direct(struct inode *inode, u64 lockstart, u64 lockend,
test_bit(BTRFS_ORDERED_DIRECT, &ordered->flags))
btrfs_start_ordered_extent(ordered);
else
- ret = nowait ? -EAGAIN : -ENOTBLK;
+ ret = -ENOTBLK;
btrfs_put_ordered_extent(ordered);
} else {
/*
--
2.43.0