We forget to release inode::i_mutex on the /O/<seq>/<dx> when meet OI
mapping conflict in osd_obj_map_recover() to recover objects from the
/lost+found to their original places. Such mutex leak will cause the
OI scrub thread or other threads to be hung when access /O/<seq>/<dx>
next time.
Test-Parameters: testlist=sanity-scrub
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Idc3b99aea5591f546a6d33e5d1fe015a2aac0167
Reviewed-on: http://review.whamcloud.com/7534
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
* So keep it there before we have suitable solution. */
brelse(bh);
* So keep it there before we have suitable solution. */
brelse(bh);
+ mutex_unlock(&dir->i_mutex);
+ mutex_unlock(&src_parent->i_mutex);
+
+ rc = -EEXIST;
/* If the src object has never been modified, then remove it. */
if (inode->i_size == 0 && inode->i_mode & S_ISUID &&
inode->i_mode & S_ISGID)
/* If the src object has never been modified, then remove it. */
if (inode->i_size == 0 && inode->i_mode & S_ISUID &&
inode->i_mode & S_ISGID)
- vfs_unlink(src_parent, src_child);
- GOTO(unlock_src, rc = 0);
+ rc = vfs_unlink(src_parent, src_child);
+ ldiskfs_journal_stop(jh);
+ RETURN(rc);
}
bh = osd_ldiskfs_find_entry(src_parent, src_child, &de, NULL);
}
bh = osd_ldiskfs_find_entry(src_parent, src_child, &de, NULL);
unlock:
mutex_unlock(&dir->i_mutex);
unlock:
mutex_unlock(&dir->i_mutex);
mutex_unlock(&src_parent->i_mutex);
ldiskfs_journal_stop(jh);
return rc;
mutex_unlock(&src_parent->i_mutex);
ldiskfs_journal_stop(jh);
return rc;
rc1 = __osd_xattr_set(info, inode, XATTR_NAME_FID, ff, size,
XATTR_CREATE);
rc1 = __osd_xattr_set(info, inode, XATTR_NAME_FID, ff, size,
XATTR_CREATE);
- if (rc1 != 0 && rc != 0)
+ if (rc1 != 0 && rc == 0)