From: David Howells Fix up the AFS filesystem caching patch for when caching is disabled. Signed-off-by: David Howells Signed-off-by: Andrew Morton --- fs/afs/file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN fs/afs/file.c~fs-cache-make-kafs-use-fs-cache-12-fix fs/afs/file.c --- a/fs/afs/file.c~fs-cache-make-kafs-use-fs-cache-12-fix +++ a/fs/afs/file.c @@ -322,13 +322,15 @@ static int afs_file_releasepage(struct p { _enter("{%lu},%x", page->index, gfp_flags); - /* deny */ +#ifdef CONFIG_AFS_FSCACHE + /* deny if page is being written to the cache */ if (PageFsMisc(page)) { _leave(" = F"); return 0; } fscache_uncache_page(AFS_FS_I(page->mapping->host)->cache, page); +#endif /* indicate that the page can be released */ _leave(" = T"); _