summaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_discard.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-03-01 23:20:20 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-03-01 23:20:20 +0000
commit8d3c3ddfa85837e24fad6fa39318617cbb59e843 (patch)
treef699dcaac2a11f0c9506ad111ae39fd5e3617c2d /fs/xfs/linux-2.6/xfs_discard.c
parente8b2c3c47a53348aebbbeb5322e32937df958793 (diff)
parent6927faf30920b8c03dfa007e732642a1f1f20089 (diff)
Merge branch 'drm-intel-fixes' into drm-intel-next
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_discard.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_discard.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_discard.c b/fs/xfs/linux-2.6/xfs_discard.c
index 05201ae719e..d61611c8801 100644
--- a/fs/xfs/linux-2.6/xfs_discard.c
+++ b/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);