/*++\r
\r
-Copyright (c) 2005 - 2007, Intel Corporation\r
+Copyright (c) 2005 - 2010, Intel Corporation\r
All rights reserved. This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
// Acquire the lock.\r
// If caller has already acquired the lock, cannot lock it again.\r
//\r
- if (!FatIsLocked ()) {\r
- FatAcquireLock ();\r
+ Status = FatAcquireLockOrFail ();\r
+ if (!EFI_ERROR (Status)) {\r
LockedByMe = TRUE;\r
}\r
//\r
// means we are in the process of some Fat operation),\r
// we can not acquire again.\r
//\r
- if (!FatIsLocked ()) {\r
+ Status = FatAcquireLockOrFail ();\r
+ if (!EFI_ERROR (Status)) {\r
LockedByMe = TRUE;\r
- FatAcquireLock ();\r
}\r
//\r
// The volume is still being used. Hence, set error flag for all OFiles still in\r