Commit e18bcb3
NFSD: only call fh_unlock() once in nfsd_link()
On non-error paths, nfsd_link() calls fh_unlock() twice. This is safe
because fh_unlock() records that the unlock has been done and doesn't
repeat it.
However it makes the code a little confusing and interferes with changes
that are planned for directory locking.
So rearrange the code to ensure fh_unlock() is called exactly once if
fh_lock() was called.
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>1 parent b677c0c commit e18bcb3
1 file changed
+10
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1541 | 1541 | | |
1542 | 1542 | | |
1543 | 1543 | | |
1544 | | - | |
1545 | | - | |
1546 | | - | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
1547 | 1548 | | |
1548 | 1549 | | |
1549 | 1550 | | |
| |||
1562 | 1563 | | |
1563 | 1564 | | |
1564 | 1565 | | |
1565 | | - | |
1566 | 1566 | | |
1567 | | - | |
1568 | | - | |
| 1567 | + | |
1569 | 1568 | | |
1570 | 1569 | | |
1571 | 1570 | | |
1572 | 1571 | | |
1573 | | - | |
1574 | | - | |
1575 | | - | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
1576 | 1577 | | |
1577 | 1578 | | |
1578 | 1579 | | |
| |||
0 commit comments