summaryrefslogtreecommitdiff
path: root/fs/ocfs2/ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/ioctl.c')
-rw-r--r--fs/ocfs2/ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/ioctl.c b/fs/ocfs2/ioctl.c
index f59461d85da4..9b78ef103ada 100644
--- a/fs/ocfs2/ioctl.c
+++ b/fs/ocfs2/ioctl.c
@@ -910,7 +910,7 @@ long ocfs2_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))
return -EOPNOTSUPP;
if (copy_from_user(&range, argp, sizeof(range)))