Commit b7e038a9 authored by Pali Rohár's avatar Pali Rohár Committed by Namjae Jeon

exfat: Fix discard support

Discard support was always unconditionally disabled. Now it is disabled
only in the case when blk_queue_discard() returns false.
Signed-off-by: default avatarPali Rohár <>
Signed-off-by: default avatarNamjae Jeon <>
parent ae83d0b4
......@@ -531,10 +531,11 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)
if (opts->discard) {
struct request_queue *q = bdev_get_queue(sb->s_bdev);
if (!blk_queue_discard(q))
if (!blk_queue_discard(q)) {
exfat_msg(sb, KERN_WARNING,
"mounting with \"discard\" option, but the device does not support discard");
opts->discard = 0;
opts->discard = 0;
sb->s_flags |= SB_NODIRATIME;
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