Split filedesc lock into directory lock and entry lock in attempt
of solving a lock order reversal.

(cherry picked from commit ca1f10cb929e1a300671d08237a4ec4ada0b60a6)