This logic maybe common, may worth implementing it in "getInodeWithLocks" with another parameter to enable it. In that case, you don't need to do the lock upgrade in this method.