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

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

diff -urN linux-2.4.26/fs/jfs/jfs_extent.c linux-2.4.27/fs/jfs/jfs_extent.c
@@ -554,6 +554,7 @@
 
 	if (S_ISREG(ip->i_mode) && (ji->fileset == FILESYSTEM_I)) {
 		ag = BLKTOAG(daddr, sbi);
+		spin_lock_irq(&ji->ag_lock);
 		if (ji->active_ag == -1) {
 			atomic_inc(&bmp->db_active[ag]);
 			ji->active_ag = ag;
@@ -562,6 +563,7 @@
 			atomic_inc(&bmp->db_active[ag]);
 			ji->active_ag = ag;
 		}
+		spin_unlock_irq(&ji->ag_lock);
 	}
 
 	return (0);

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