diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-03-29 18:17:30 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-03-29 18:17:30 -0700 |
commit | 1ec48f95519bd3e920536118e8ddd30e28cde4ab (patch) | |
tree | 481a7d8b78b981e1ae3c4a0b88bd09a6a8fcc928 /fs/jfs/inode.c | |
parent | 1c24a186398f59c80adb9a967486b65c1423a59d (diff) | |
parent | a53046291020ec41e09181396c1e829287b48d47 (diff) |
Merge tag 'jfs-5.18' of https://github.com/kleikamp/linux-shaggy
Pull jfs updates from Dave Kleikamp:
"A couple bug fixes"
* tag 'jfs-5.18' of https://github.com/kleikamp/linux-shaggy:
jfs: prevent NULL deref in diFree
jfs: fix divide error in dbNextAG
Diffstat (limited to 'fs/jfs/inode.c')
-rw-r--r-- | fs/jfs/inode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index 27be2e8ba237..d1943a7b4b04 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c @@ -146,12 +146,13 @@ void jfs_evict_inode(struct inode *inode) dquot_initialize(inode); if (JFS_IP(inode)->fileset == FILESYSTEM_I) { + struct inode *ipimap = JFS_SBI(inode->i_sb)->ipimap; truncate_inode_pages_final(&inode->i_data); if (test_cflag(COMMIT_Freewmap, inode)) jfs_free_zero_link(inode); - if (JFS_SBI(inode->i_sb)->ipimap) + if (ipimap && JFS_IP(ipimap)->i_imap) diFree(inode); /* |