rbd: Release resource before return

Close file before return.
Fix coverity issue: CID 1019579

Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Reported-by: Xianxia Xiao <xianxiaxiao@ubuntukylin.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
mds: Release resource before return

Close file before return.
Fix coverity issue: CID 1019571

Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Reported-by: Xianxia Xiao <xianxiaxiao@ubuntukylin.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>