From patchwork Tue Mar 15 10:10:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102571 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp567124lbc; Tue, 15 Mar 2016 03:22:40 -0700 (PDT) X-Received: by 10.66.229.35 with SMTP id sn3mr44634884pac.77.1458037360647; Tue, 15 Mar 2016 03:22:40 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u79si7185757pfa.232.2016.03.15.03.22.40; Tue, 15 Mar 2016 03:22:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965405AbcCOKWi (ORCPT + 31 others); Tue, 15 Mar 2016 06:22:38 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:54178 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934579AbcCOKWb (ORCPT ); Tue, 15 Mar 2016 06:22:31 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue102) with ESMTPA (Nemesis) id 0MejLU-1aUjUJ0NSq-00OHF8; Tue, 15 Mar 2016 11:22:27 +0100 From: Arnd Bergmann To: Benjamin LaHaise Cc: Arnd Bergmann , Alexander Viro , linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] aio: always provide ki_destruct_fn callback pointer Date: Tue, 15 Mar 2016 11:10:17 +0100 Message-Id: <1458036631-2972900-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:4dfTY2I6q6Qj5IqLWTPiRdvyfQDn4l+LacVchneaFL7d6Ey/72H 1yMRbbmGpjD0VpOhT05GWjzWNvuarTm7BEZ6jkc0kna4fgV9d5Wqtzy0+tYATG4jKo6nOEg JO4uSgBQxxizAMc9WIS78NWHx5a7Y5TAAlqFxCrcCAhj+tgc9Y6RvV47uXELBVD0L7ltEIg rs2ncVSZw6LhCcOoSDFQQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:vCfZZNh6dMo=:jlVDylbxzwtZr9pnHFZN6V NnOqkgHFi7IkcUPSgbb0H4nle6txQc1bMcPQGzw7q8tnYU14eFZgnt48rzHTAHnJBYt9gDB7c 3M+sqOTS5qFmdgq/gJqDPOBot7qRvXEYSS7+qFp73Cb6EKcSm1NkAbp8sMD9RQGJzx3Ys0oj5 C9ibRi7/Vo4JVvPN0JFIPL5ck01Dc6aMML91F46+2b8BOhDpXYQN/Bc115Hk8fHSvwFGa+OW+ m5cu/Sb8KRQ0b0Sd3Ib6XziZ4r0ETIw09TfluAg8gB2Eds19BrUaB1LbdRyyIL78QoRLYNu4A CUt0WHAYKWpXD69pbFpr/CW1qrgf7nZq4qrjgtNui/ci6fSU8reCwy+29Dw4dpD3qHZBw/IEu ySggXo+i7/YwnK6nI5hWGFpDWS4niwaujaApNzS8G/FZ9m+dSfn5uDi95Nu0mavAX4BhmKKGy a50kDOVuyOWdclFnhYdyH5s3Q5VIx0yLrZxG36OyQhkCP7RntGGXbTqFPyiv1lDqm8AdTTf0g DsrkrNtxci11MrZ556amxD8m843rymR+uhvJcAuPT+enecr0jC9W6t7pADggl5U+pdfVUXEIu qKtN3oNjb1Kp5D34uzNp4OsiePCQX2n3HJhZsEt7tkkkTifTiCWH8ukNNTSx2h/wwkOqrwAqf jXlAGjn5SM9L4I6DU18yKu6CoZI1BLICPnTQCQ5bY8TtTfR7K6iR0wCYze3MCRjL0tfE= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The newly added synchronous openat support in AIO adds a ki_destruct_fn function pointer to struct aio_kiocb inside of a CONFIG_AIO_THREAD check but calls it unconditionally, leading to a build error: fs/aio.c: In function 'kiocb_free': fs/aio.c:1101:9: error: 'struct aio_kiocb' has no member named 'ki_destruct_fn' if (req->ki_destruct_fn) ^~ fs/aio.c:1102:6: error: 'struct aio_kiocb' has no member named 'ki_destruct_fn' This moves the declaration outside of the #ifdef, assuming that we want to call this regardless. Signed-off-by: Arnd Bergmann Fixes: 5d3d80fcf992 ("aio: add support for in-submit openat") --- fs/aio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.0 diff --git a/fs/aio.c b/fs/aio.c index f6d7df041342..72a7e8a2f67e 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -221,8 +221,8 @@ struct aio_kiocb { struct fs_struct *ki_fs; struct files_struct *ki_files; const struct cred *ki_cred; - aio_destruct_fn_t ki_destruct_fn; #endif + aio_destruct_fn_t ki_destruct_fn; }; /*------ sysctl variables----*/