mds: simplify, fix err.errno problem

Signed-off-by: Sage Weil <sage@inktank.com>