Whamcloud - gitweb
LU-458 debug: print client profile name correctly
authorYu Jian <yujian@whamcloud.com>
Mon, 21 May 2012 06:23:28 +0000 (14:23 +0800)
committerJohann Lombardi <johann@whamcloud.com>
Wed, 23 May 2012 11:56:54 +0000 (07:56 -0400)
commit294b4090131fddbb2632cfaf6f97e28ad1ba62a4
tree2c7518784b96acf96be18953c4e77e473edf8ae2
parent7ef90f4a240ad479d8d93aaff0d61ef06e19520f
LU-458 debug: print client profile name correctly

This patch reverts commit 48c2f667236e2f41f9fd0224b5de7a83517b3180,
which does not print client profile name correctly and introduces
a new defect that the client profile is not deleted properly.

In ll_put_super(), the memory space pointed to by profilenm is
in fact freed inside lustre_common_put_super(sb), which is called
before LCONSOLE_WARN(). In order to print the client profile name
in LCONSOLE_WARN(), we need copy the contents of profilenm to a
temporary storage before freeing profilenm.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I9ce2f304f3bad4761d2e3c857e4cdd5df6269c38
Reviewed-on: http://review.whamcloud.com/2841
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
lustre/llite/llite_lib.c