Skip to content

Commit 76e2b0b

Browse files
tiwaigregkh
authored andcommitted
cachefiles: Drop superfluous readpages aops NULL check
commit db58465 upstream. After the recent actions to convert readpages aops to readahead, the NULL checks of readpages aops in cachefiles_read_or_alloc_page() may hit falsely. More badly, it's an ASSERT() call, and this panics. Drop the superfluous NULL checks for fixing this regression. [DH: Note that cachefiles never actually used readpages, so this check was never actually necessary] BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208883 BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1175245 Fixes: 9ae326a ("CacheFiles: A cache that backs onto a mounted filesystem") Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 20fa3a7 commit 76e2b0b

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

fs/cachefiles/rdwr.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,6 @@ int cachefiles_read_or_alloc_page(struct fscache_retrieval *op,
413413

414414
inode = d_backing_inode(object->backer);
415415
ASSERT(S_ISREG(inode->i_mode));
416-
ASSERT(inode->i_mapping->a_ops->readpages);
417416

418417
/* calculate the shift required to use bmap */
419418
shift = PAGE_SHIFT - inode->i_sb->s_blocksize_bits;
@@ -713,7 +712,6 @@ int cachefiles_read_or_alloc_pages(struct fscache_retrieval *op,
713712

714713
inode = d_backing_inode(object->backer);
715714
ASSERT(S_ISREG(inode->i_mode));
716-
ASSERT(inode->i_mapping->a_ops->readpages);
717715

718716
/* calculate the shift required to use bmap */
719717
shift = PAGE_SHIFT - inode->i_sb->s_blocksize_bits;

0 commit comments

Comments
 (0)