Skip to content

Commit

Permalink
nfs: do not export discarded symbols
Browse files Browse the repository at this point in the history
The function nfs4_pnfs_v3_ds_connect_unload is exported so it can be
used by other modules, but is also marked '__exit' and will be
discarded when built into the kernel, as pointed out by this
linker error:

`nfs4_pnfs_v3_ds_connect_unload' referenced in section `___ksymtab_gpl+nfs4_pnfs_v3_ds_connect_unload' of fs/built-in.o: defined in discarded section `.exit.text' of fs/built-in.o

This removes the __exit annotation to make it safe to call this function.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 5f01d95 ("nfs41: create NFSv3 DS connection if specified")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
  • Loading branch information
Arnd Bergmann authored and Trond Myklebust committed Mar 12, 2015
1 parent 5b83382 commit df137bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfs/pnfs_nfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ static bool load_v3_ds_connect(void)
return(get_v3_ds_connect != NULL);
}

void __exit nfs4_pnfs_v3_ds_connect_unload(void)
void nfs4_pnfs_v3_ds_connect_unload(void)
{
if (get_v3_ds_connect) {
symbol_put(nfs3_set_ds_client);
Expand Down

0 comments on commit df137bc

Please sign in to comment.