diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 8b5f5fb8f5cb..f0be6a62120a 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1237,10 +1237,12 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) if (test_opt(sbi, DISCARD)) { struct request_queue *q = bdev_get_queue(sb->s_bdev); - if (!blk_queue_discard(q)) + if (!blk_queue_discard(q)) { f2fs_msg(sb, KERN_WARNING, "mounting with \"discard\" option, but " "the device does not support discard"); + clear_opt(sbi, DISCARD); + } } sbi->s_kobj.kset = f2fs_kset;