Commit 8e1611e
make sock_alloc_file() do sock_release() on failures
This changes calling conventions (and simplifies the hell out
the callers). New rules: once struct socket had been passed
to sock_alloc_file(), it's been consumed either by struct file
or by sock_release() done by sock_alloc_file(). Either way
the caller should not do sock_release() after that point.
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 016a266 commit 8e1611e
File tree
5 files changed
+11
-31
lines changed- drivers/staging/lustre/lnet/lnet
- net
- 9p
- kcm
- sctp
5 files changed
+11
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 74 | + | |
| 75 | + | |
79 | 76 | | |
80 | 77 | | |
81 | 78 | | |
82 | 79 | | |
83 | | - | |
84 | 80 | | |
85 | 81 | | |
86 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
839 | 839 | | |
840 | 840 | | |
841 | 841 | | |
842 | | - | |
843 | 842 | | |
844 | 843 | | |
845 | 844 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1629 | 1629 | | |
1630 | 1630 | | |
1631 | 1631 | | |
1632 | | - | |
1633 | 1632 | | |
1634 | 1633 | | |
1635 | 1634 | | |
| |||
1649 | 1648 | | |
1650 | 1649 | | |
1651 | 1650 | | |
1652 | | - | |
1653 | | - | |
1654 | | - | |
1655 | | - | |
1656 | | - | |
| 1651 | + | |
1657 | 1652 | | |
1658 | 1653 | | |
1659 | 1654 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5080 | 5080 | | |
5081 | 5081 | | |
5082 | 5082 | | |
5083 | | - | |
5084 | 5083 | | |
5085 | 5084 | | |
5086 | 5085 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
| 409 | + | |
| 410 | + | |
410 | 411 | | |
| 412 | + | |
411 | 413 | | |
412 | 414 | | |
413 | 415 | | |
414 | 416 | | |
415 | 417 | | |
416 | 418 | | |
417 | 419 | | |
418 | | - | |
| 420 | + | |
419 | 421 | | |
420 | 422 | | |
| 423 | + | |
| 424 | + | |
421 | 425 | | |
422 | 426 | | |
423 | 427 | | |
| |||
1330 | 1334 | | |
1331 | 1335 | | |
1332 | 1336 | | |
1333 | | - | |
1334 | | - | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
| 1337 | + | |
1342 | 1338 | | |
1343 | | - | |
1344 | | - | |
1345 | | - | |
| 1339 | + | |
1346 | 1340 | | |
1347 | 1341 | | |
1348 | 1342 | | |
| |||
1412 | 1406 | | |
1413 | 1407 | | |
1414 | 1408 | | |
1415 | | - | |
1416 | 1409 | | |
1417 | 1410 | | |
1418 | 1411 | | |
1419 | 1412 | | |
1420 | 1413 | | |
1421 | 1414 | | |
1422 | 1415 | | |
1423 | | - | |
1424 | 1416 | | |
1425 | 1417 | | |
1426 | 1418 | | |
| |||
1549 | 1541 | | |
1550 | 1542 | | |
1551 | 1543 | | |
1552 | | - | |
1553 | 1544 | | |
1554 | 1545 | | |
1555 | 1546 | | |
| |||
0 commit comments