Skip to content

Commit 2b1bec5

Browse files
ebiedermLinus Torvalds
authored andcommitted
[PATCH] sysctl: sunrpc: don't unnecessarily set ctl_table->de
We don't need this to prevent module unload races so remove the unnecessary code. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 7e35280 commit 2b1bec5

2 files changed

Lines changed: 2 additions & 13 deletions

File tree

‎net/sunrpc/sysctl.c‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,8 @@ static ctl_table sunrpc_table[];
3535
void
3636
rpc_register_sysctl(void)
3737
{
38-
if (!sunrpc_table_header) {
38+
if (!sunrpc_table_header)
3939
sunrpc_table_header = register_sysctl_table(sunrpc_table, 0);
40-
#ifdef CONFIG_PROC_FS
41-
if (sunrpc_table[0].de)
42-
sunrpc_table[0].de->owner = THIS_MODULE;
43-
#endif
44-
}
45-
4640
}
4741

4842
void

‎net/sunrpc/xprtsock.c‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,13 +1635,8 @@ struct rpc_xprt *xs_setup_tcp(struct sockaddr *addr, size_t addrlen, struct rpc_
16351635
int init_socket_xprt(void)
16361636
{
16371637
#ifdef RPC_DEBUG
1638-
if (!sunrpc_table_header) {
1638+
if (!sunrpc_table_header)
16391639
sunrpc_table_header = register_sysctl_table(sunrpc_table, 0);
1640-
#ifdef CONFIG_PROC_FS
1641-
if (sunrpc_table[0].de)
1642-
sunrpc_table[0].de->owner = THIS_MODULE;
1643-
#endif
1644-
}
16451640
#endif
16461641

16471642
return 0;

0 commit comments

Comments
 (0)