ceph: optimize mds session register
authorChengguang Xu <cgxu519@gmx.com>
Tue, 13 Mar 2018 15:01:07 +0000 (23:01 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 2 Apr 2018 08:12:48 +0000 (10:12 +0200)
commit47474d0b011bb385719e91a60bb9ff7649d66526
treea684ee4707ccc3a7909c975f8eec4bca61203f8c
parent57a35dfb522c8bbac622d49f5217906f9b5eceb0
ceph: optimize mds session register

Do memory allocation first, so that avoid unnecessary
initialization of newly allocated session in error case.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c