From patchwork Fri Sep 29 19:24:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 9978539 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5998B60365 for ; Fri, 29 Sep 2017 19:24:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42145280CF for ; Fri, 29 Sep 2017 19:24:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 356E6283BF; Fri, 29 Sep 2017 19:24:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD0D3280CF for ; Fri, 29 Sep 2017 19:24:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752330AbdI2TYJ (ORCPT ); Fri, 29 Sep 2017 15:24:09 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:32939 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752294AbdI2TYJ (ORCPT ); Fri, 29 Sep 2017 15:24:09 -0400 Received: by mail-qk0-f194.google.com with SMTP id r141so72464qke.0 for ; Fri, 29 Sep 2017 12:24:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=G9uRVDlhce9+AyiEdmwrtesqLI4MmgQ6dD5e0GhZkkQ=; b=P5Puhhu0YzNIB8Y4SJn1DghowPRVjDoJrtGeLQum1Si8SnwgNFM9zrIFzh/Frhyd+9 tVDgSof5UDBRCsu7sEZDK93F/0G58kVkVyGTgtoqj+vaC/DuhgR+xRLhHYaCejbYG1za 3Ux3M7frCsIrlLva7EO2TI+6r9SqjAJfOhRTVTPkCShdtGeJmApMYzVKjLzM88oUn3wZ Z9VcftdOzk28m52Q9BqvIbNWRuTKHnfWVCaoZHdaYfcfgI9GV3qua4CViARRog0tZ3k3 WDXWnE8UqerQmy8qyCfN17x4HVFUEE6h0NUV4KGKBcRpvOiuHUDjzp0ERAsTpRtzK2av UBSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=G9uRVDlhce9+AyiEdmwrtesqLI4MmgQ6dD5e0GhZkkQ=; b=LVxEelw/olOS3qpGugQXpL6gJxcoX7p+xcMZIArYsj+OfLjeV4qiZbhdTlDEFbCivo w8CQC558ziiz5pO6QhNH4eM8mdH85c1BAH5StF7XgpCXnUFGVJbilLA6FPtRtn3P8jfJ WsfNqpE35KrPMgqD1/946em6WI6oX4LHP0s53BsmDTAi6N1BekieHY0PvcQVKCHK73Et zBTaSOdm9XAxZf1zC30A1mmR3R05lTamS4Az4wAhTdwOweqBFvs6nFM/y9SZT9xhDziH 24A+i1X6tcIRb54TnCYQLgx7DZAJVMhNde/ej1bZD6AO9Ib48mQTyv3Up/qiLHtk7F/2 CFYg== X-Gm-Message-State: AMCzsaWWiVzzQVJVUwQmErttJ3p+9cZUgK0QhSsNTnTLhjKHzXMa0cfs 3OC9BtmDccL6zCI3Bf/6qI2qaA== X-Google-Smtp-Source: AOwi7QCT1ut98rA1lmkl2Q8Q1ogQXTxma9M411GnuzX3hBGgS1pZOZHWqW2tmQ71Ur9+cpnWLX/oEw== X-Received: by 10.55.51.144 with SMTP id z138mr4767838qkz.334.1506713048348; Fri, 29 Sep 2017 12:24:08 -0700 (PDT) Received: from localhost ([2606:a000:4381:1201:225:22ff:feb3:e51a]) by smtp.gmail.com with ESMTPSA id f4sm3177276qte.76.2017.09.29.12.24.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Sep 2017 12:24:07 -0700 (PDT) From: Josef Bacik X-Google-Original-From: Josef Bacik To: viro@ZenIV.linux.org.uk, kernel-team@fb.com, linux-fsdevel@vger.kernel.org Subject: [PATCH] fs: make fiemap work from compat_ioctl Date: Fri, 29 Sep 2017 15:24:06 -0400 Message-Id: <1506713046-19299-1-git-send-email-jbacik@fb.com> X-Mailer: git-send-email 2.7.4 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We don't need to do anything special with fiemap to make it work with a 64bit kernel from 32bit userspace, so just go down to do_vfs_ioctl(). Without this patch we were incorrectly failing to do fiemap with a 32bit userspace on a 64bit kernel. Signed-off-by: Josef Bacik Reviewed-by: Christoph Hellwig --- fs/compat_ioctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index d27b326d96f4..480f9366b4e3 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -1579,6 +1579,7 @@ COMPAT_SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd, case FICLONE: case FICLONERANGE: case FIDEDUPERANGE: + case FS_IOC_FIEMAP: goto do_ioctl; case FIBMAP: