diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index d4714d6cf7d92d495ff4a01b9ffaa47a0651bdfb..53472e27b3277dc0c7bbcc287b7f765885cc5797 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -2613,7 +2613,7 @@ static inline void ext4_issue_discard(struct super_block *sb, trace_ext4_discard_blocks(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); }