pfk: use cached mapping at all places in pfk_bio_get_inode()
The page->mapping will be set to NULL when it is truncated.
The same metadata page if it is currently under processing by
ext4/jbd2, then it is possible for pfk_bio_get_inode() to see
inconsistent page->mapping, for the requests submitted by jbd2
on this page. To avoid this inconsistency, use cached mapping at
all places in pfk_bio_get_inode(). It doesn't matter whether the
pfk driver sees the mapping or sees null mapping for metadata
requests because, pfk_allow_merge_bio() will always return true
for 2 journal metadata requests and for one journal and one
non-journal request, it always returns false (independent of
the metadata page mapping state).
Change-Id: Ia452f972346e1ba3b25560ffa140d023dbb3409d
Signed-off-by:
Sahitya Tummala <stummala@codeaurora.org>
Loading
Please register or sign in to comment