Commit 51c89e6a authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller

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: 91b467e0 ("afs: Make afs_readpages() fetch data in bulk")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4b5b1ac5
...@@ -267,7 +267,9 @@ static int afs_readpage(struct file *file, struct page *page) ...@@ -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) static void afs_readpages_page_done(struct afs_call *call, struct afs_read *req)
{ {
#ifdef CONFIG_AFS_FSCACHE
struct afs_vnode *vnode = call->reply; struct afs_vnode *vnode = call->reply;
#endif
struct page *page = req->pages[req->index]; struct page *page = req->pages[req->index];
req->pages[req->index] = NULL; req->pages[req->index] = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment