--- x/fs/inode.c +++ y/fs/inode.c @@ -1758,6 +1758,8 @@ static void iput_final(struct inode *ino */ void iput(struct inode *inode) { + int j; + if (!inode) return; BUG_ON(inode->i_state & I_CLEAR); @@ -1770,6 +1772,10 @@ retry: mark_inode_dirty_sync(inode); goto retry; } + spin_unlock(&inode->i_lock); + for (j = 0; j < (1 << 20); j++) + cpu_relax(); + spin_lock(&inode->i_lock); iput_final(inode); } }