Fixed getting space for making an index non resident

Under some rare condition there is no space in an MFT entry to make
an index non-resident, and the index root has to be moved to an extent.
This fix cares for the situation when the attribute list was inserted
beforehand.
This commit is contained in:
Jean-Pierre André 2015-11-09 16:09:52 +01:00
parent 1aaaa8fac1
commit 37bd6661d4

View File

@ -1175,8 +1175,7 @@ retry :
* index, we may have to move the root to an extent
*/
if ((errno == ENOSPC)
&& !ctx->al_entry
&& !ntfs_inode_add_attrlist(icx->ni)) {
&& (ctx->al_entry || !ntfs_inode_add_attrlist(icx->ni))) {
ntfs_attr_put_search_ctx(ctx);
ctx = (ntfs_attr_search_ctx*)NULL;
ir = ntfs_ir_lookup(icx->ni, icx->name, icx->name_len,