Whamcloud - gitweb
LU-3611 quota: Fix order of locking and allocating memory. 65/7065/4
authorLi Xi <lixi@ddn.com>
Wed, 24 Jul 2013 03:33:05 +0000 (20:33 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 24 Jul 2013 02:12:43 +0000 (02:12 +0000)
commitf4caf6de3ecff7f72fdf6b804da30823c4d0979d
tree0710a5cffd6d1c030477b75eb66382821bb2b9f2
parent6350af100c204a4db794e7472951ab72c3bc20ef
LU-3611 quota: Fix order of locking and allocating memory.

mgs_pool_cmd() locks fsdb_mutex and then allocates mti. It will
leave fsdb_mutex locked if it fails to allocate memory.

This patch fixes the problem.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I10f92522c509052916a7d7134d73c4923cfaf33e
Reviewed-on: http://review.whamcloud.com/7065
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/mgs/mgs_llog.c