patch-2.4.27 linux-2.4.27/fs/jfs/inode.c

Next file: linux-2.4.27/fs/jfs/jfs_btree.h
Previous file: linux-2.4.27/fs/jfs/file.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/fs/jfs/inode.c linux-2.4.27/fs/jfs/inode.c
@@ -49,10 +49,13 @@
 
 	jfs_info("jfs_clear_inode called ip = 0x%p", inode);
 
+	spin_lock_irq(&ji->ag_lock);
 	if (ji->active_ag != -1) {
 		struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap;
 		atomic_dec(&bmap->db_active[ji->active_ag]);
+		ji->active_ag = -1;
 	}
+	spin_unlock_irq(&ji->ag_lock);
 
 	ASSERT(list_empty(&ji->anon_inode_list));
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)