From: Arnd Bergmann <arnd@arndb.de>
To: Benjamin LaHaise <bcrl@kvack.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
Alexander Viro <viro@zeniv.linux.org.uk>,
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 [thread overview]
Message-ID: <1458036631-2972900-1-git-send-email-arnd@arndb.de> (raw)
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 <arnd@arndb.de>
Fixes: 5d3d80fcf992 ("aio: add support for in-submit openat")
---
fs/aio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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----*/
--
2.7.0
reply other threads:[~2016-03-15 10:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1458036631-2972900-1-git-send-email-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=bcrl@kvack.org \
--cc=linux-aio@kvack.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®