]> nv-tegra.nvidia Code Review - linux-3.10.git/blobdiff - fs/jfs/super.c
JFS: Fix race in txLock
[linux-3.10.git] / fs / jfs / super.c
index c2abdaee0c0b56fd5f22eda6da423dfb2e7ebc35..9ff89720f93bab8bfeaee75ac656e04f6a0de3ee 100644 (file)
@@ -114,6 +114,8 @@ static void jfs_destroy_inode(struct inode *inode)
 {
        struct jfs_inode_info *ji = JFS_IP(inode);
 
 {
        struct jfs_inode_info *ji = JFS_IP(inode);
 
+       BUG_ON(!list_empty(&ji->anon_inode_list));
+
        spin_lock_irq(&ji->ag_lock);
        if (ji->active_ag != -1) {
                struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap;
        spin_lock_irq(&ji->ag_lock);
        if (ji->active_ag != -1) {
                struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap;