X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fjfs%2Finode.c;h=9f942ca8e4e3369440f408fd6b5650d1095ff5a8;hb=e2f99018eb7b29954747a2dd78e9fc0c36a60f0f;hp=2137138c59b0a4c08839121f0b89c5a55699a9b0;hpb=cb220c1af49644786944c549518b491d4c654030;p=linux-2.6 diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index 2137138c59..9f942ca8e4 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c @@ -128,17 +128,22 @@ void jfs_delete_inode(struct inode *inode) { jfs_info("In jfs_delete_inode, inode = 0x%p", inode); - if (test_cflag(COMMIT_Freewmap, inode)) - jfs_free_zero_link(inode); + if (!is_bad_inode(inode) && + (JFS_IP(inode)->fileset == FILESYSTEM_I)) { + truncate_inode_pages(&inode->i_data, 0); - diFree(inode); + if (test_cflag(COMMIT_Freewmap, inode)) + jfs_free_zero_link(inode); - /* - * Free the inode from the quota allocation. - */ - DQUOT_INIT(inode); - DQUOT_FREE_INODE(inode); - DQUOT_DROP(inode); + diFree(inode); + + /* + * Free the inode from the quota allocation. + */ + DQUOT_INIT(inode); + DQUOT_FREE_INODE(inode); + DQUOT_DROP(inode); + } clear_inode(inode); }