Blame SOURCES/0013-exfat-Fix-discard-support.patch
|
Kmods SIG |
9e3ffb |
From b7e038a92449f191395fbb86538b14093c529833 Mon Sep 17 00:00:00 2001
|
|
Kmods SIG |
9e3ffb |
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
|
|
Kmods SIG |
9e3ffb |
Date: Tue, 17 Mar 2020 22:46:52 +0100
|
|
Kmods SIG |
9e3ffb |
Subject: [Backport b7e038a92449] exfat: Fix discard support
|
|
Kmods SIG |
9e3ffb |
MIME-Version: 1.0
|
|
Kmods SIG |
9e3ffb |
Content-Type: text/plain; charset=UTF-8
|
|
Kmods SIG |
9e3ffb |
Content-Transfer-Encoding: 8bit
|
|
Kmods SIG |
9e3ffb |
|
|
Kmods SIG |
9e3ffb |
Discard support was always unconditionally disabled. Now it is disabled
|
|
Kmods SIG |
9e3ffb |
only in the case when blk_queue_discard() returns false.
|
|
Kmods SIG |
9e3ffb |
|
|
Kmods SIG |
9e3ffb |
Signed-off-by: Pali Rohár <pali@kernel.org>
|
|
Kmods SIG |
9e3ffb |
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
|
|
Kmods SIG |
9e3ffb |
---
|
|
Kmods SIG |
9e3ffb |
src/super.c | 5 +++--
|
|
Kmods SIG |
9e3ffb |
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
Kmods SIG |
9e3ffb |
|
|
Kmods SIG |
9e3ffb |
diff --git a/src/super.c b/src/super.c
|
|
Kmods SIG |
9e3ffb |
index 16ed202ef5279abc40b23d03cd346b4baf4c23d3..30e914ad17b59643bb9ad99beb7868a79659dcee 100644
|
|
Kmods SIG |
9e3ffb |
--- a/src/super.c
|
|
Kmods SIG |
9e3ffb |
+++ b/src/super.c
|
|
Kmods SIG |
9e3ffb |
@@ -531,10 +531,11 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)
|
|
Kmods SIG |
9e3ffb |
if (opts->discard) {
|
|
Kmods SIG |
9e3ffb |
struct request_queue *q = bdev_get_queue(sb->s_bdev);
|
|
Kmods SIG |
9e3ffb |
|
|
Kmods SIG |
9e3ffb |
- if (!blk_queue_discard(q))
|
|
Kmods SIG |
9e3ffb |
+ if (!blk_queue_discard(q)) {
|
|
Kmods SIG |
9e3ffb |
exfat_msg(sb, KERN_WARNING,
|
|
Kmods SIG |
9e3ffb |
"mounting with \"discard\" option, but the device does not support discard");
|
|
Kmods SIG |
9e3ffb |
- opts->discard = 0;
|
|
Kmods SIG |
9e3ffb |
+ opts->discard = 0;
|
|
Kmods SIG |
9e3ffb |
+ }
|
|
Kmods SIG |
9e3ffb |
}
|
|
Kmods SIG |
9e3ffb |
|
|
Kmods SIG |
9e3ffb |
sb->s_flags |= SB_NODIRATIME;
|
|
Kmods SIG |
9e3ffb |
--
|
|
Kmods SIG |
9e3ffb |
2.31.1
|
|
Kmods SIG |
9e3ffb |
|