The helper function is for requests that operate on two paths. It
ensures that the two paths get locks in proper order. The rule is:
1. Lock directory inodes or dentries according to which trees they
are under. Lock objects under fs root before objects under mdsdir.
2. Lock directory inodes or dentries according to their depth, in
ascending order.
3. Lock directory inodes or dentries according to inode numbers or
dentries' parent inode numbers, in ascending order.
4. Lock dentries in the same directory in order of their keys.
5. Lock non-directory inodes according to inode numbers, in ascending
order.
This patch also makes handle_client_link() and handle_client_rename()
to use this helper function.