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