* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
mdt_set_disposition(info, rep, DISP_OPEN_LOCK);
rc = mdt_finish_open(info, NULL, o, flags, 0, rep);
- if (!(flags & MDS_OPEN_LOCK))
+ if (!(flags & MDS_OPEN_LOCK) || rc)
mdt_object_unlock(info, o, lhc, 1);
GOTO(out, rc);