From 1bb41e6f3498f00361ff5f06329dcbd9caa968f0 Mon Sep 17 00:00:00 2001 From: Namjae Jeon Date: Mon, 17 Dec 2012 16:02:56 -0800 Subject: [PATCH] --- yaml --- r: 346449 b: refs/heads/master c: f562146a3daf6aa0bbf2a1bc4b6b7da031ed5dcd h: refs/heads/master i: 346447: 63ec31ae3189eea483fc7b77c0dacb0160ab3cb5 v: v3 --- [refs] | 2 +- trunk/fs/fat/inode.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 9d01c56e7427..c49d7b2608d3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6920d996e3fee4ac5dcb7d34cb290b6f67bb69d0 +refs/heads/master: f562146a3daf6aa0bbf2a1bc4b6b7da031ed5dcd diff --git a/trunk/fs/fat/inode.c b/trunk/fs/fat/inode.c index 5bafaad00530..7b186a5d51b1 100644 --- a/trunk/fs/fat/inode.c +++ b/trunk/fs/fat/inode.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include "fat.h" @@ -1431,6 +1432,14 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, goto out_fail; } + if (sbi->options.discard) { + struct request_queue *q = bdev_get_queue(sb->s_bdev); + if (!blk_queue_discard(q)) + fat_msg(sb, KERN_WARNING, + "mounting with \"discard\" option, but " + "the device does not support discard"); + } + return 0; out_invalid: