Whamcloud - gitweb
LU-867 ptlrpc: Resolve section mismatch
The __init and __exit attributes appear to have been over used for
the ptlrpc module. They should only be attached to ptlrpc_init and
ptlrpc_exit respectively and those functions should call the required
cleanup functions. By using the attributes too broadly the following
section mismatch warning with be hit. This indentifies cases where
your calling an __exit function from an __init function which is in
the wrong section.
WARNING: ~/src/git/lustre/lustre/ptlrpc/ptlrpc.o(.init.text+0x354):
Section mismatch in reference from the function ptlrpc_init() to the
function .exit.text:sptlrpc_fini() The function __init ptlrpc_init()
references a function __exit sptlrpc_fini().
This is often seen when error handling in the init function uses
functionality in the exit path. The fix is often to remove the
__exit annotation of sptlrpc_fini() so it may be used outside an
exit section.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I94a4cb5fb7deea41fce5ee939470dc2e40908f98
Reviewed-on: http://review.whamcloud.com/1653
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>