]> git.baikalelectronics.ru Git - kernel.git/commit
net/sunrpc: return 0 on attempt to write to "transports"
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 6 Nov 2020 20:39:50 +0000 (15:39 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 6 Nov 2020 20:56:18 +0000 (15:56 -0500)
commitabd47dd1e0f31744966ae859964a9cea2deb3330
tree73f3f92c1aaaf5be72d4083299f584eafdf69b5a
parente609f389206c47040f72d830cc41b75feb81ecda
net/sunrpc: return 0 on attempt to write to "transports"

You can't write to this file because the permissions are 0444.  But
it sort of looked like you could do a write and it would result in
a read.  Then it looked like proc_sys_call_handler() just ignored
it.  Which is confusing.  It's more clear if the "write" just
returns zero.

Also, the "lenp" pointer is never NULL so that check can be removed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/sysctl.c