diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-03-01 23:20:20 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-03-01 23:20:20 +0000 |
commit | 8d3c3ddfa85837e24fad6fa39318617cbb59e843 (patch) | |
tree | f699dcaac2a11f0c9506ad111ae39fd5e3617c2d /fs/xfs/linux-2.6/xfs_discard.c | |
parent | e8b2c3c47a53348aebbbeb5322e32937df958793 (diff) | |
parent | 6927faf30920b8c03dfa007e732642a1f1f20089 (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.c | 2 |
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); |