From: Arnd Bergmann Date: Fri, 13 Jan 2017 14:46:19 +0000 (+0000) Subject: afs: Conditionalise a new unused variable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=51c89e6a3bf68d544e29b234c2cef6ffb73277a1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git afs: Conditionalise a new unused variable The bulk readpages support introduced a harmless warning: fs/afs/file.c: In function 'afs_readpages_page_done': fs/afs/file.c:270:20: error: unused variable 'vnode' [-Werror=unused-variable] This adds an #ifdef to match the user of that variable. The user of the variable has to be conditional because it accesses a member of a struct that is also conditional. Fixes: 91b467e0a3f5 ("afs: Make afs_readpages() fetch data in bulk") Signed-off-by: Arnd Bergmann Signed-off-by: David Howells Signed-off-by: David S. Miller --- diff --git a/fs/afs/file.c b/fs/afs/file.c index 82897a78abc7..ba7b71fba34b 100644 --- a/fs/afs/file.c +++ b/fs/afs/file.c @@ -267,7 +267,9 @@ static int afs_readpage(struct file *file, struct page *page) */ static void afs_readpages_page_done(struct afs_call *call, struct afs_read *req) { +#ifdef CONFIG_AFS_FSCACHE struct afs_vnode *vnode = call->reply; +#endif struct page *page = req->pages[req->index]; req->pages[req->index] = NULL;