diff --git a/[refs] b/[refs] index 92c482dc2eb5..9705e0cf0920 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3a3675b7f23f83ca8c67c9c2b6edf707fd28d1ba +refs/heads/master: be715140b5c3baf8ab6708060cfab80bef279d18 diff --git a/trunk/fs/xfs/linux-2.6/xfs_discard.c b/trunk/fs/xfs/linux-2.6/xfs_discard.c index 05201ae719e5..d61611c88012 100644 --- a/trunk/fs/xfs/linux-2.6/xfs_discard.c +++ b/trunk/fs/xfs/linux-2.6/xfs_discard.c @@ -152,6 +152,8 @@ xfs_ioc_trim( if (!capable(CAP_SYS_ADMIN)) return -XFS_ERROR(EPERM); + if (!blk_queue_discard(q)) + return -XFS_ERROR(EOPNOTSUPP); if (copy_from_user(&range, urange, sizeof(range))) return -XFS_ERROR(EFAULT);