Commit d20e9e42 authored by Dave Kleikamp's avatar Dave Kleikamp Committed by Dave Kleikamp

JFS: Fix accounting of active allocation groups

jfs_destroy_inode was assuming that active_ag should never be set coming into
this routine.  Since it's possible for file to be extended after the file
descriptor has been closed, we need to allow the possibility.  (Dirty pages
of memory mapped files can be written after the file has been closed.)
parent ebf488f2
...@@ -97,6 +97,11 @@ static void jfs_destroy_inode(struct inode *inode) ...@@ -97,6 +97,11 @@ static void jfs_destroy_inode(struct inode *inode)
{ {
struct jfs_inode_info *ji = JFS_IP(inode); struct jfs_inode_info *ji = JFS_IP(inode);
if (ji->active_ag != -1) {
struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap;
atomic_dec(&bmap->db_active[ji->active_ag]);
}
#ifdef CONFIG_JFS_POSIX_ACL #ifdef CONFIG_JFS_POSIX_ACL
if (ji->i_acl && (ji->i_acl != JFS_ACL_NOT_CACHED)) if (ji->i_acl && (ji->i_acl != JFS_ACL_NOT_CACHED))
posix_acl_release(ji->i_acl); posix_acl_release(ji->i_acl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment