staging/lustre/procfs: return -ENOMEM from lprocfs_register()
authorJohn L. Hammond <john.hammond@intel.com>
Mon, 22 Jul 2013 16:06:58 +0000 (00:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 20:42:12 +0000 (13:42 -0700)
commit5907838a44d71a446c6e418f1b9d8a66fff4cbfb
tree1292944dc1013e53d4d0f4db16e7e347a242a6a9
parente62e5d9251bf8efd08318e78bcaca86fde228383
staging/lustre/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.

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2650
Lustre-change: http://review.whamcloud.com/5161
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
drivers/staging/lustre/lustre/llite/super25.c
drivers/staging/lustre/lustre/lov/lov_obd.c
drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
drivers/staging/lustre/lustre/ptlrpc/gss/lproc_gss.c