We are calling mdc_blocking_ast() to clean up an inode that is already
being cleaned up elsewhere. This is the result of ldlm_cli_cancel_unused()
being called from two places at the same time:
- ll_prepare_recovery()->prepare_mdc()->ldlm_cli_cancel_unused()
- ll_clear_inode()->mdc_cancel_unused()->ldlm_cli_cancel_unused()
There is still a small race where the ll_clear_inode() RPC could have
completed and "inode" is garbage, but since we are in recovery this
is highly unlikely.
/* Invalidate all dentries associated with this inode */
struct inode *inode = data;
+#warning "FIXME: what tells us that 'inode' is valid at all?"
+ if (!(inode->i_state & I_FREEING))
+ break;
+
LASSERT(inode != NULL);
LASSERT(data_len == sizeof(*inode));
ll_invalidate_inode_pages(inode);
}
- if ( inode != inode->i_sb->s_root->d_inode ) {
+ if ( inode != inode->i_sb->s_root->d_inode ) {
+ /* XXX should this igrab move up 12 lines? */
LASSERT(igrab(inode) == inode);
d_delete_aliases(inode);
iput(inode);