Whamcloud - gitweb
LU-2650 procfs: return -ENOMEM from lprocfs_register() 61/5161/5
authorJohn L. Hammond <john.hammond@intel.com>
Thu, 24 Jan 2013 22:54:36 +0000 (16:54 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 10 Jul 2013 02:00:47 +0000 (02:00 +0000)
commit6f827e863f99f21fc03c6fa55fe7fd4a74966c7e
tree43c97b27a738b0f415493738a83a542a55590412
parent266c87754f6e168e27fc5ee0ebe19479c9a57449
LU-2650 procfs: return -ENOMEM from lprocfs_register()

In lprocfs_register(), if proc_mkdir() fails then return
ERR_PTR(-ENOMEM) rather than NULL and hold _lprocfs_mutex for the
whole function.  In lprocfs_remove_nolock() return early if the entry
is an error pointer. Improve error handling around lprocfs_register()
in a few spots.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I8d452781afe4b7c174c3b5fac9f4f0e573a3d85c
Reviewed-on: http://review.whamcloud.com/5161
Tested-by: Hudson
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/ldlm/ldlm_pool.c
lustre/obdclass/lprocfs_status.c
lustre/ptlrpc/gss/lproc_gss.c