summaryrefslogtreecommitdiff
path: root/fs/exfat
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2020-03-18 00:46:52 +0300
committerNamjae Jeon <namjae.jeon@samsung.com>2020-04-22 14:14:05 +0300
commitb7e038a92449f191395fbb86538b14093c529833 (patch)
tree8c00ada4edc94ba71c57a7b8c804efdd3064c375 /fs/exfat
parentae83d0b416db002fe95601e7f97f64b59514d936 (diff)
downloadlinux-b7e038a92449f191395fbb86538b14093c529833.tar.xz
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: Pali Rohár <pali@kernel.org> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Diffstat (limited to 'fs/exfat')
-rw-r--r--fs/exfat/super.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/exfat/super.c b/fs/exfat/super.c
index 16ed202ef527..30e914ad17b5 100644
--- a/fs/exfat/super.c
+++ b/fs/exfat/super.c
@@ -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;