block: remove QUEUE_FLAG_DISCARD
[sfrench/cifs-2.6.git] / fs / jfs / ioctl.c
index 03a845ab4f009c30e6fc2a941bb2196f21a65200..357ae6e5c36ec101a66815228ee688eb6056e0a9 100644 (file)
@@ -117,7 +117,7 @@ long jfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
                if (!capable(CAP_SYS_ADMIN))
                        return -EPERM;
 
-               if (!blk_queue_discard(q)) {
+               if (!bdev_max_discard_sectors(sb->s_bdev)) {
                        jfs_warn("FITRIM not supported on device");
                        return -EOPNOTSUPP;
                }