Commit 58298709 authored by Lukas Czerner's avatar Lukas Czerner Committed by Theodore Ts'o
Browse files

ext4: check for negative error code from sb_issue_discard

sb_issue_discard() is returning negative error code, so check for
Signed-off-by: default avatarLukas Czerner <>
Signed-off-by: default avatar"Theodore Ts'o" <>
parent b443e733
......@@ -2613,7 +2613,7 @@ static inline void ext4_issue_discard(struct super_block *sb,
(unsigned long long) discard_block, count);
ret = sb_issue_discard(sb, discard_block, count);
if (ret == EOPNOTSUPP) {
if (ret == -EOPNOTSUPP) {
ext4_warning(sb, "discard not supported, disabling");
clear_opt(EXT4_SB(sb)->s_mount_opt, DISCARD);
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