Commit 21d316a
committed
NFSD: Clean up nfsd4_encode_copy_notify()
Replace open-coded encoding logic with the use of conventional XDR
utility functions.
Note that if we replace the cpn_sec and cpn_nsec fields with a
single struct timespec64 field, the encoder can use
nfsd4_encode_nfstime4(), as that is the data type specified by the
XDR spec.
NFS4ERR_INVAL seems inappropriate if the encoder doesn't support
encoding the response. Instead use NFS4ERR_SERVERFAULT, since this
condition is a software bug on the server.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>1 parent 02e0297 commit 21d316a
3 files changed
Lines changed: 44 additions & 69 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1939 | 1939 | | |
1940 | 1940 | | |
1941 | 1941 | | |
1942 | | - | |
1943 | | - | |
| 1942 | + | |
| 1943 | + | |
1944 | 1944 | | |
1945 | 1945 | | |
1946 | 1946 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2575 | 2575 | | |
2576 | 2576 | | |
2577 | 2577 | | |
| 2578 | + | |
| 2579 | + | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
2578 | 2591 | | |
2579 | 2592 | | |
2580 | 2593 | | |
| |||
5132 | 5145 | | |
5133 | 5146 | | |
5134 | 5147 | | |
5135 | | - | |
| 5148 | + | |
5136 | 5149 | | |
5137 | | - | |
5138 | | - | |
5139 | | - | |
5140 | | - | |
5141 | | - | |
5142 | | - | |
| 5150 | + | |
5143 | 5151 | | |
| 5152 | + | |
| 5153 | + | |
5144 | 5154 | | |
5145 | 5155 | | |
5146 | | - | |
5147 | | - | |
5148 | | - | |
5149 | | - | |
5150 | | - | |
5151 | | - | |
5152 | | - | |
5153 | | - | |
5154 | | - | |
5155 | | - | |
5156 | | - | |
5157 | | - | |
5158 | | - | |
5159 | | - | |
5160 | | - | |
5161 | | - | |
5162 | | - | |
5163 | | - | |
5164 | | - | |
| 5156 | + | |
| 5157 | + | |
5165 | 5158 | | |
5166 | 5159 | | |
5167 | | - | |
5168 | | - | |
| 5160 | + | |
5169 | 5161 | | |
| 5162 | + | |
| 5163 | + | |
5170 | 5164 | | |
5171 | | - | |
| 5165 | + | |
| 5166 | + | |
| 5167 | + | |
| 5168 | + | |
| 5169 | + | |
| 5170 | + | |
| 5171 | + | |
| 5172 | + | |
| 5173 | + | |
| 5174 | + | |
| 5175 | + | |
| 5176 | + | |
| 5177 | + | |
| 5178 | + | |
| 5179 | + | |
| 5180 | + | |
| 5181 | + | |
| 5182 | + | |
| 5183 | + | |
5172 | 5184 | | |
5173 | 5185 | | |
5174 | 5186 | | |
| |||
5261 | 5273 | | |
5262 | 5274 | | |
5263 | 5275 | | |
5264 | | - | |
5265 | | - | |
5266 | | - | |
5267 | | - | |
5268 | | - | |
5269 | | - | |
5270 | | - | |
5271 | | - | |
5272 | | - | |
5273 | | - | |
5274 | | - | |
5275 | | - | |
5276 | | - | |
5277 | | - | |
5278 | | - | |
5279 | | - | |
5280 | | - | |
5281 | | - | |
5282 | | - | |
5283 | | - | |
5284 | | - | |
5285 | | - | |
5286 | | - | |
5287 | | - | |
5288 | | - | |
5289 | | - | |
5290 | | - | |
5291 | | - | |
5292 | | - | |
5293 | | - | |
5294 | | - | |
5295 | | - | |
5296 | | - | |
5297 | | - | |
5298 | | - | |
5299 | | - | |
5300 | 5276 | | |
5301 | 5277 | | |
5302 | 5278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
748 | | - | |
749 | | - | |
| 748 | + | |
750 | 749 | | |
751 | 750 | | |
752 | 751 | | |
| |||
0 commit comments