Changeset 0be611b in mainline


Ignore:
Timestamp:
2011-08-26T23:42:52Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4cf5ed46
Parents:
7ece4247
Message:

Do not leave parentp→idx→lock locked when returning from fat_link().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/fat/fat_ops.c

    r7ece4247 r0be611b  
    604604        bs = block_bb_get(parentp->idx->service_id);
    605605        rc = fat_directory_open(parentp, &di);
    606         if (rc != EOK)
    607                 return rc;
     606        if (rc != EOK) {
     607                fibril_mutex_unlock(&parentp->idx->lock);
     608                return rc;
     609        }
    608610
    609611        /*
     
    616618
    617619        rc = fat_directory_write(&di, name, &de);
    618         if (rc != EOK)
    619                 return rc;
     620        if (rc != EOK) {
     621                (void) fat_directory_close(&di);
     622                fibril_mutex_unlock(&parentp->idx->lock);
     623                return rc;
     624        }
    620625        rc = fat_directory_close(&di);
    621         if (rc != EOK)
    622                 return rc;
     626        if (rc != EOK) {
     627                fibril_mutex_unlock(&parentp->idx->lock);
     628                return rc;
     629        }
    623630
    624631        fibril_mutex_unlock(&parentp->idx->lock);
    625         if (rc != EOK)
    626                 return rc;
    627632
    628633        fibril_mutex_lock(&childp->idx->lock);
Note: See TracChangeset for help on using the changeset viewer.