On Tue, Jul 26, 2011 at 09:13:12PM -0400, Theodore Ts'o wrote: > + inode = igrab(inode); > + while (ext4_test_inode_state(inode, EXT4_STATE_NEWENTRY)) { > ext4_clear_inode_state(inode, EXT4_STATE_NEWENTRY); > - dentry = list_entry(inode->i_dentry.next, > - struct dentry, d_alias); > - if (!dentry || !dentry->d_parent || !dentry->d_parent->d_inode) > + dentry = list_first_entry(&inode->i_dentry, > + struct dentry, d_alias); ... and what if you don't have a dentry for that inode anymore? > + next = igrab(dentry->d_parent->d_inode); what protects you against rename() (OK, d_mode()) here? -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html