diff options
| author | Joel Becker <jlbec@evilplan.org> | 2011-03-28 09:44:26 -0700 |
|---|---|---|
| committer | Joel Becker <jlbec@evilplan.org> | 2011-03-28 09:44:26 -0700 |
| commit | 99bdc3880c611c7f2061fbd5372ef81b40217e26 (patch) | |
| tree | ef68a53e28e9ee53ce9db3642bab5fa5b3d44866 /fs/xfs/linux-2.6/xfs_discard.c | |
| parent | ed59992e8d91b70053c53d846a76f7e1ac000454 (diff) | |
| parent | b4e1b7e88b2c87c358c2a88bec0c76d25accc604 (diff) | |
Merge branch 'mlog_replace_for_39' of git://repo.or.cz/taoma-kernel into ocfs2-merge-window-fix
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); |
