diff options
| author | Raghuram Subramani <raghus2247@gmail.com> | 2024-10-13 13:36:36 +0530 |
|---|---|---|
| committer | Raghuram Subramani <raghus2247@gmail.com> | 2024-10-13 13:36:36 +0530 |
| commit | 6a21d8496b038d1e71fd6a9bd8a95880135665d9 (patch) | |
| tree | 8f96e9273400c0eb8794f92aef733bb5fe52b658 /security/pfe/pfk.c | |
| parent | b73f506bc0ae7119f5f629b222596a27d7b2e99b (diff) | |
| parent | 17d850f5a5bc1318b67a974b16d32a2dd3bab5cf (diff) | |
Merge remote-tracking branch 'msm8998/lineage-20'master
Diffstat (limited to 'security/pfe/pfk.c')
| -rw-r--r-- | security/pfe/pfk.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/security/pfe/pfk.c b/security/pfe/pfk.c index 2e5aa2fb6688..c49b30e66f46 100644 --- a/security/pfe/pfk.c +++ b/security/pfe/pfk.c @@ -198,6 +198,8 @@ static inline bool pfk_is_ready(void) */ static struct inode *pfk_bio_get_inode(const struct bio *bio) { + struct inode *inode; + if (!bio) return NULL; if (!bio_has_data((struct bio *)bio)) @@ -207,11 +209,9 @@ static struct inode *pfk_bio_get_inode(const struct bio *bio) if (!bio->bi_io_vec->bv_page) return NULL; - if (PageAnon(bio->bi_io_vec->bv_page)) { - struct inode *inode; - - /* Using direct-io (O_DIRECT) without page cache */ - inode = dio_bio_get_inode((struct bio *)bio); + /* Using direct-io (O_DIRECT) without page cache */ + inode = dio_bio_get_inode((struct bio *)bio); + if (inode) { pr_debug("inode on direct-io, inode = 0x%p.\n", inode); return inode; |
