aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2009-04-01 09:22:11 -0400
committerBenny Halevy <bhalevy@panasas.com>2009-06-17 13:46:36 -0400
commit9b7b9fcc9c124b8a2a079f748239ce9b7a8d8304 (patch)
tree35c1064b856a6633c153f5b3b3d26bdb097e5ab5 /fs
parent66cc042970f7077c66be65a780eb3a60a9bcbf0b (diff)
nfs41: xdr {encode,decode}_sequence
Implement stubs for encode and decode sequence, defined as no-ops when CONFIG_NFS_V4_1 is not defined. Add the nfsv41 encode and decode sizes. Add encode_sequence to all nfs4_enc_* routines and decode_sequence to all nfs4_dec_* routines as required by v41. [was nfs41: minorversion support for xdr] [added nfs_client argument to encode_sequence so not to use sequence_args to pass sa_session] Signed-off-by: Andy Adamson<andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfs41: pass *session in seq_args and seq_res] Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4xdr.c242
1 files changed, 232 insertions, 10 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 19ca0b519a1d..5b944cd57218 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -244,43 +244,63 @@ static int nfs4_stat_to_errno(int);
244 (encode_getattr_maxsz) 244 (encode_getattr_maxsz)
245#define decode_fs_locations_maxsz \ 245#define decode_fs_locations_maxsz \
246 (0) 246 (0)
247
248#if defined(CONFIG_NFS_V4_1)
249#define encode_sequence_maxsz 0 /* stub */
250#define decode_sequence_maxsz 0 /* stub */
251#else /* CONFIG_NFS_V4_1 */
252#define encode_sequence_maxsz 0
253#define decode_sequence_maxsz 0
254#endif /* CONFIG_NFS_V4_1 */
255
247#define NFS4_enc_compound_sz (1024) /* XXX: large enough? */ 256#define NFS4_enc_compound_sz (1024) /* XXX: large enough? */
248#define NFS4_dec_compound_sz (1024) /* XXX: large enough? */ 257#define NFS4_dec_compound_sz (1024) /* XXX: large enough? */
249#define NFS4_enc_read_sz (compound_encode_hdr_maxsz + \ 258#define NFS4_enc_read_sz (compound_encode_hdr_maxsz + \
259 encode_sequence_maxsz + \
250 encode_putfh_maxsz + \ 260 encode_putfh_maxsz + \
251 encode_read_maxsz) 261 encode_read_maxsz)
252#define NFS4_dec_read_sz (compound_decode_hdr_maxsz + \ 262#define NFS4_dec_read_sz (compound_decode_hdr_maxsz + \
263 decode_sequence_maxsz + \
253 decode_putfh_maxsz + \ 264 decode_putfh_maxsz + \
254 decode_read_maxsz) 265 decode_read_maxsz)
255#define NFS4_enc_readlink_sz (compound_encode_hdr_maxsz + \ 266#define NFS4_enc_readlink_sz (compound_encode_hdr_maxsz + \
267 encode_sequence_maxsz + \
256 encode_putfh_maxsz + \ 268 encode_putfh_maxsz + \
257 encode_readlink_maxsz) 269 encode_readlink_maxsz)
258#define NFS4_dec_readlink_sz (compound_decode_hdr_maxsz + \ 270#define NFS4_dec_readlink_sz (compound_decode_hdr_maxsz + \
271 decode_sequence_maxsz + \
259 decode_putfh_maxsz + \ 272 decode_putfh_maxsz + \
260 decode_readlink_maxsz) 273 decode_readlink_maxsz)
261#define NFS4_enc_readdir_sz (compound_encode_hdr_maxsz + \ 274#define NFS4_enc_readdir_sz (compound_encode_hdr_maxsz + \
275 encode_sequence_maxsz + \
262 encode_putfh_maxsz + \ 276 encode_putfh_maxsz + \
263 encode_readdir_maxsz) 277 encode_readdir_maxsz)
264#define NFS4_dec_readdir_sz (compound_decode_hdr_maxsz + \ 278#define NFS4_dec_readdir_sz (compound_decode_hdr_maxsz + \
279 decode_sequence_maxsz + \
265 decode_putfh_maxsz + \ 280 decode_putfh_maxsz + \
266 decode_readdir_maxsz) 281 decode_readdir_maxsz)
267#define NFS4_enc_write_sz (compound_encode_hdr_maxsz + \ 282#define NFS4_enc_write_sz (compound_encode_hdr_maxsz + \
283 encode_sequence_maxsz + \
268 encode_putfh_maxsz + \ 284 encode_putfh_maxsz + \
269 encode_write_maxsz + \ 285 encode_write_maxsz + \
270 encode_getattr_maxsz) 286 encode_getattr_maxsz)
271#define NFS4_dec_write_sz (compound_decode_hdr_maxsz + \ 287#define NFS4_dec_write_sz (compound_decode_hdr_maxsz + \
288 decode_sequence_maxsz + \
272 decode_putfh_maxsz + \ 289 decode_putfh_maxsz + \
273 decode_write_maxsz + \ 290 decode_write_maxsz + \
274 decode_getattr_maxsz) 291 decode_getattr_maxsz)
275#define NFS4_enc_commit_sz (compound_encode_hdr_maxsz + \ 292#define NFS4_enc_commit_sz (compound_encode_hdr_maxsz + \
293 encode_sequence_maxsz + \
276 encode_putfh_maxsz + \ 294 encode_putfh_maxsz + \
277 encode_commit_maxsz + \ 295 encode_commit_maxsz + \
278 encode_getattr_maxsz) 296 encode_getattr_maxsz)
279#define NFS4_dec_commit_sz (compound_decode_hdr_maxsz + \ 297#define NFS4_dec_commit_sz (compound_decode_hdr_maxsz + \
298 decode_sequence_maxsz + \
280 decode_putfh_maxsz + \ 299 decode_putfh_maxsz + \
281 decode_commit_maxsz + \ 300 decode_commit_maxsz + \
282 decode_getattr_maxsz) 301 decode_getattr_maxsz)
283#define NFS4_enc_open_sz (compound_encode_hdr_maxsz + \ 302#define NFS4_enc_open_sz (compound_encode_hdr_maxsz + \
303 encode_sequence_maxsz + \
284 encode_putfh_maxsz + \ 304 encode_putfh_maxsz + \
285 encode_savefh_maxsz + \ 305 encode_savefh_maxsz + \
286 encode_open_maxsz + \ 306 encode_open_maxsz + \
@@ -289,6 +309,7 @@ static int nfs4_stat_to_errno(int);
289 encode_restorefh_maxsz + \ 309 encode_restorefh_maxsz + \
290 encode_getattr_maxsz) 310 encode_getattr_maxsz)
291#define NFS4_dec_open_sz (compound_decode_hdr_maxsz + \ 311#define NFS4_dec_open_sz (compound_decode_hdr_maxsz + \
312 decode_sequence_maxsz + \
292 decode_putfh_maxsz + \ 313 decode_putfh_maxsz + \
293 decode_savefh_maxsz + \ 314 decode_savefh_maxsz + \
294 decode_open_maxsz + \ 315 decode_open_maxsz + \
@@ -305,43 +326,53 @@ static int nfs4_stat_to_errno(int);
305 decode_putfh_maxsz + \ 326 decode_putfh_maxsz + \
306 decode_open_confirm_maxsz) 327 decode_open_confirm_maxsz)
307#define NFS4_enc_open_noattr_sz (compound_encode_hdr_maxsz + \ 328#define NFS4_enc_open_noattr_sz (compound_encode_hdr_maxsz + \
329 encode_sequence_maxsz + \
308 encode_putfh_maxsz + \ 330 encode_putfh_maxsz + \
309 encode_open_maxsz + \ 331 encode_open_maxsz + \
310 encode_getattr_maxsz) 332 encode_getattr_maxsz)
311#define NFS4_dec_open_noattr_sz (compound_decode_hdr_maxsz + \ 333#define NFS4_dec_open_noattr_sz (compound_decode_hdr_maxsz + \
334 decode_sequence_maxsz + \
312 decode_putfh_maxsz + \ 335 decode_putfh_maxsz + \
313 decode_open_maxsz + \ 336 decode_open_maxsz + \
314 decode_getattr_maxsz) 337 decode_getattr_maxsz)
315#define NFS4_enc_open_downgrade_sz \ 338#define NFS4_enc_open_downgrade_sz \
316 (compound_encode_hdr_maxsz + \ 339 (compound_encode_hdr_maxsz + \
340 encode_sequence_maxsz + \
317 encode_putfh_maxsz + \ 341 encode_putfh_maxsz + \
318 encode_open_downgrade_maxsz + \ 342 encode_open_downgrade_maxsz + \
319 encode_getattr_maxsz) 343 encode_getattr_maxsz)
320#define NFS4_dec_open_downgrade_sz \ 344#define NFS4_dec_open_downgrade_sz \
321 (compound_decode_hdr_maxsz + \ 345 (compound_decode_hdr_maxsz + \
346 decode_sequence_maxsz + \
322 decode_putfh_maxsz + \ 347 decode_putfh_maxsz + \
323 decode_open_downgrade_maxsz + \ 348 decode_open_downgrade_maxsz + \
324 decode_getattr_maxsz) 349 decode_getattr_maxsz)
325#define NFS4_enc_close_sz (compound_encode_hdr_maxsz + \ 350#define NFS4_enc_close_sz (compound_encode_hdr_maxsz + \
351 encode_sequence_maxsz + \
326 encode_putfh_maxsz + \ 352 encode_putfh_maxsz + \
327 encode_close_maxsz + \ 353 encode_close_maxsz + \
328 encode_getattr_maxsz) 354 encode_getattr_maxsz)
329#define NFS4_dec_close_sz (compound_decode_hdr_maxsz + \ 355#define NFS4_dec_close_sz (compound_decode_hdr_maxsz + \
356 decode_sequence_maxsz + \
330 decode_putfh_maxsz + \ 357 decode_putfh_maxsz + \
331 decode_close_maxsz + \ 358 decode_close_maxsz + \
332 decode_getattr_maxsz) 359 decode_getattr_maxsz)
333#define NFS4_enc_setattr_sz (compound_encode_hdr_maxsz + \ 360#define NFS4_enc_setattr_sz (compound_encode_hdr_maxsz + \
361 encode_sequence_maxsz + \
334 encode_putfh_maxsz + \ 362 encode_putfh_maxsz + \
335 encode_setattr_maxsz + \ 363 encode_setattr_maxsz + \
336 encode_getattr_maxsz) 364 encode_getattr_maxsz)
337#define NFS4_dec_setattr_sz (compound_decode_hdr_maxsz + \ 365#define NFS4_dec_setattr_sz (compound_decode_hdr_maxsz + \
366 decode_sequence_maxsz + \
338 decode_putfh_maxsz + \ 367 decode_putfh_maxsz + \
339 decode_setattr_maxsz + \ 368 decode_setattr_maxsz + \
340 decode_getattr_maxsz) 369 decode_getattr_maxsz)
341#define NFS4_enc_fsinfo_sz (compound_encode_hdr_maxsz + \ 370#define NFS4_enc_fsinfo_sz (compound_encode_hdr_maxsz + \
371 encode_sequence_maxsz + \
342 encode_putfh_maxsz + \ 372 encode_putfh_maxsz + \
343 encode_fsinfo_maxsz) 373 encode_fsinfo_maxsz)
344#define NFS4_dec_fsinfo_sz (compound_decode_hdr_maxsz + \ 374#define NFS4_dec_fsinfo_sz (compound_decode_hdr_maxsz + \
375 decode_sequence_maxsz + \
345 decode_putfh_maxsz + \ 376 decode_putfh_maxsz + \
346 decode_fsinfo_maxsz) 377 decode_fsinfo_maxsz)
347#define NFS4_enc_renew_sz (compound_encode_hdr_maxsz + \ 378#define NFS4_enc_renew_sz (compound_encode_hdr_maxsz + \
@@ -363,64 +394,81 @@ static int nfs4_stat_to_errno(int);
363 decode_putrootfh_maxsz + \ 394 decode_putrootfh_maxsz + \
364 decode_fsinfo_maxsz) 395 decode_fsinfo_maxsz)
365#define NFS4_enc_lock_sz (compound_encode_hdr_maxsz + \ 396#define NFS4_enc_lock_sz (compound_encode_hdr_maxsz + \
397 encode_sequence_maxsz + \
366 encode_putfh_maxsz + \ 398 encode_putfh_maxsz + \
367 encode_lock_maxsz) 399 encode_lock_maxsz)
368#define NFS4_dec_lock_sz (compound_decode_hdr_maxsz + \ 400#define NFS4_dec_lock_sz (compound_decode_hdr_maxsz + \
401 decode_sequence_maxsz + \
369 decode_putfh_maxsz + \ 402 decode_putfh_maxsz + \
370 decode_lock_maxsz) 403 decode_lock_maxsz)
371#define NFS4_enc_lockt_sz (compound_encode_hdr_maxsz + \ 404#define NFS4_enc_lockt_sz (compound_encode_hdr_maxsz + \
405 encode_sequence_maxsz + \
372 encode_putfh_maxsz + \ 406 encode_putfh_maxsz + \
373 encode_lockt_maxsz) 407 encode_lockt_maxsz)
374#define NFS4_dec_lockt_sz (compound_decode_hdr_maxsz + \ 408#define NFS4_dec_lockt_sz (compound_decode_hdr_maxsz + \
409 decode_sequence_maxsz + \
375 decode_putfh_maxsz + \ 410 decode_putfh_maxsz + \
376 decode_lockt_maxsz) 411 decode_lockt_maxsz)
377#define NFS4_enc_locku_sz (compound_encode_hdr_maxsz + \ 412#define NFS4_enc_locku_sz (compound_encode_hdr_maxsz + \
413 encode_sequence_maxsz + \
378 encode_putfh_maxsz + \ 414 encode_putfh_maxsz + \
379 encode_locku_maxsz) 415 encode_locku_maxsz)
380#define NFS4_dec_locku_sz (compound_decode_hdr_maxsz + \ 416#define NFS4_dec_locku_sz (compound_decode_hdr_maxsz + \
417 decode_sequence_maxsz + \
381 decode_putfh_maxsz + \ 418 decode_putfh_maxsz + \
382 decode_locku_maxsz) 419 decode_locku_maxsz)
383#define NFS4_enc_access_sz (compound_encode_hdr_maxsz + \ 420#define NFS4_enc_access_sz (compound_encode_hdr_maxsz + \
421 encode_sequence_maxsz + \
384 encode_putfh_maxsz + \ 422 encode_putfh_maxsz + \
385 encode_access_maxsz + \ 423 encode_access_maxsz + \
386 encode_getattr_maxsz) 424 encode_getattr_maxsz)
387#define NFS4_dec_access_sz (compound_decode_hdr_maxsz + \ 425#define NFS4_dec_access_sz (compound_decode_hdr_maxsz + \
426 decode_sequence_maxsz + \
388 decode_putfh_maxsz + \ 427 decode_putfh_maxsz + \
389 decode_access_maxsz + \ 428 decode_access_maxsz + \
390 decode_getattr_maxsz) 429 decode_getattr_maxsz)
391#define NFS4_enc_getattr_sz (compound_encode_hdr_maxsz + \ 430#define NFS4_enc_getattr_sz (compound_encode_hdr_maxsz + \
431 encode_sequence_maxsz + \
392 encode_putfh_maxsz + \ 432 encode_putfh_maxsz + \
393 encode_getattr_maxsz) 433 encode_getattr_maxsz)
394#define NFS4_dec_getattr_sz (compound_decode_hdr_maxsz + \ 434#define NFS4_dec_getattr_sz (compound_decode_hdr_maxsz + \
435 decode_sequence_maxsz + \
395 decode_putfh_maxsz + \ 436 decode_putfh_maxsz + \
396 decode_getattr_maxsz) 437 decode_getattr_maxsz)
397#define NFS4_enc_lookup_sz (compound_encode_hdr_maxsz + \ 438#define NFS4_enc_lookup_sz (compound_encode_hdr_maxsz + \
439 encode_sequence_maxsz + \
398 encode_putfh_maxsz + \ 440 encode_putfh_maxsz + \
399 encode_lookup_maxsz + \ 441 encode_lookup_maxsz + \
400 encode_getattr_maxsz + \ 442 encode_getattr_maxsz + \
401 encode_getfh_maxsz) 443 encode_getfh_maxsz)
402#define NFS4_dec_lookup_sz (compound_decode_hdr_maxsz + \ 444#define NFS4_dec_lookup_sz (compound_decode_hdr_maxsz + \
445 decode_sequence_maxsz + \
403 decode_putfh_maxsz + \ 446 decode_putfh_maxsz + \
404 decode_lookup_maxsz + \ 447 decode_lookup_maxsz + \
405 decode_getattr_maxsz + \ 448 decode_getattr_maxsz + \
406 decode_getfh_maxsz) 449 decode_getfh_maxsz)
407#define NFS4_enc_lookup_root_sz (compound_encode_hdr_maxsz + \ 450#define NFS4_enc_lookup_root_sz (compound_encode_hdr_maxsz + \
451 encode_sequence_maxsz + \
408 encode_putrootfh_maxsz + \ 452 encode_putrootfh_maxsz + \
409 encode_getattr_maxsz + \ 453 encode_getattr_maxsz + \
410 encode_getfh_maxsz) 454 encode_getfh_maxsz)
411#define NFS4_dec_lookup_root_sz (compound_decode_hdr_maxsz + \ 455#define NFS4_dec_lookup_root_sz (compound_decode_hdr_maxsz + \
456 decode_sequence_maxsz + \
412 decode_putrootfh_maxsz + \ 457 decode_putrootfh_maxsz + \
413 decode_getattr_maxsz + \ 458 decode_getattr_maxsz + \
414 decode_getfh_maxsz) 459 decode_getfh_maxsz)
415#define NFS4_enc_remove_sz (compound_encode_hdr_maxsz + \ 460#define NFS4_enc_remove_sz (compound_encode_hdr_maxsz + \
461 encode_sequence_maxsz + \
416 encode_putfh_maxsz + \ 462 encode_putfh_maxsz + \
417 encode_remove_maxsz + \ 463 encode_remove_maxsz + \
418 encode_getattr_maxsz) 464 encode_getattr_maxsz)
419#define NFS4_dec_remove_sz (compound_decode_hdr_maxsz + \ 465#define NFS4_dec_remove_sz (compound_decode_hdr_maxsz + \
466 decode_sequence_maxsz + \
420 decode_putfh_maxsz + \ 467 decode_putfh_maxsz + \
421 decode_remove_maxsz + \ 468 decode_remove_maxsz + \
422 decode_getattr_maxsz) 469 decode_getattr_maxsz)
423#define NFS4_enc_rename_sz (compound_encode_hdr_maxsz + \ 470#define NFS4_enc_rename_sz (compound_encode_hdr_maxsz + \
471 encode_sequence_maxsz + \
424 encode_putfh_maxsz + \ 472 encode_putfh_maxsz + \
425 encode_savefh_maxsz + \ 473 encode_savefh_maxsz + \
426 encode_putfh_maxsz + \ 474 encode_putfh_maxsz + \
@@ -429,6 +477,7 @@ static int nfs4_stat_to_errno(int);
429 encode_restorefh_maxsz + \ 477 encode_restorefh_maxsz + \
430 encode_getattr_maxsz) 478 encode_getattr_maxsz)
431#define NFS4_dec_rename_sz (compound_decode_hdr_maxsz + \ 479#define NFS4_dec_rename_sz (compound_decode_hdr_maxsz + \
480 decode_sequence_maxsz + \
432 decode_putfh_maxsz + \ 481 decode_putfh_maxsz + \
433 decode_savefh_maxsz + \ 482 decode_savefh_maxsz + \
434 decode_putfh_maxsz + \ 483 decode_putfh_maxsz + \
@@ -437,6 +486,7 @@ static int nfs4_stat_to_errno(int);
437 decode_restorefh_maxsz + \ 486 decode_restorefh_maxsz + \
438 decode_getattr_maxsz) 487 decode_getattr_maxsz)
439#define NFS4_enc_link_sz (compound_encode_hdr_maxsz + \ 488#define NFS4_enc_link_sz (compound_encode_hdr_maxsz + \
489 encode_sequence_maxsz + \
440 encode_putfh_maxsz + \ 490 encode_putfh_maxsz + \
441 encode_savefh_maxsz + \ 491 encode_savefh_maxsz + \
442 encode_putfh_maxsz + \ 492 encode_putfh_maxsz + \
@@ -445,6 +495,7 @@ static int nfs4_stat_to_errno(int);
445 encode_restorefh_maxsz + \ 495 encode_restorefh_maxsz + \
446 decode_getattr_maxsz) 496 decode_getattr_maxsz)
447#define NFS4_dec_link_sz (compound_decode_hdr_maxsz + \ 497#define NFS4_dec_link_sz (compound_decode_hdr_maxsz + \
498 decode_sequence_maxsz + \
448 decode_putfh_maxsz + \ 499 decode_putfh_maxsz + \
449 decode_savefh_maxsz + \ 500 decode_savefh_maxsz + \
450 decode_putfh_maxsz + \ 501 decode_putfh_maxsz + \
@@ -453,16 +504,19 @@ static int nfs4_stat_to_errno(int);
453 decode_restorefh_maxsz + \ 504 decode_restorefh_maxsz + \
454 decode_getattr_maxsz) 505 decode_getattr_maxsz)
455#define NFS4_enc_symlink_sz (compound_encode_hdr_maxsz + \ 506#define NFS4_enc_symlink_sz (compound_encode_hdr_maxsz + \
507 encode_sequence_maxsz + \
456 encode_putfh_maxsz + \ 508 encode_putfh_maxsz + \
457 encode_symlink_maxsz + \ 509 encode_symlink_maxsz + \
458 encode_getattr_maxsz + \ 510 encode_getattr_maxsz + \
459 encode_getfh_maxsz) 511 encode_getfh_maxsz)
460#define NFS4_dec_symlink_sz (compound_decode_hdr_maxsz + \ 512#define NFS4_dec_symlink_sz (compound_decode_hdr_maxsz + \
513 decode_sequence_maxsz + \
461 decode_putfh_maxsz + \ 514 decode_putfh_maxsz + \
462 decode_symlink_maxsz + \ 515 decode_symlink_maxsz + \
463 decode_getattr_maxsz + \ 516 decode_getattr_maxsz + \
464 decode_getfh_maxsz) 517 decode_getfh_maxsz)
465#define NFS4_enc_create_sz (compound_encode_hdr_maxsz + \ 518#define NFS4_enc_create_sz (compound_encode_hdr_maxsz + \
519 encode_sequence_maxsz + \
466 encode_putfh_maxsz + \ 520 encode_putfh_maxsz + \
467 encode_savefh_maxsz + \ 521 encode_savefh_maxsz + \
468 encode_create_maxsz + \ 522 encode_create_maxsz + \
@@ -471,6 +525,7 @@ static int nfs4_stat_to_errno(int);
471 encode_restorefh_maxsz + \ 525 encode_restorefh_maxsz + \
472 encode_getattr_maxsz) 526 encode_getattr_maxsz)
473#define NFS4_dec_create_sz (compound_decode_hdr_maxsz + \ 527#define NFS4_dec_create_sz (compound_decode_hdr_maxsz + \
528 decode_sequence_maxsz + \
474 decode_putfh_maxsz + \ 529 decode_putfh_maxsz + \
475 decode_savefh_maxsz + \ 530 decode_savefh_maxsz + \
476 decode_create_maxsz + \ 531 decode_create_maxsz + \
@@ -479,49 +534,63 @@ static int nfs4_stat_to_errno(int);
479 decode_restorefh_maxsz + \ 534 decode_restorefh_maxsz + \
480 decode_getattr_maxsz) 535 decode_getattr_maxsz)
481#define NFS4_enc_pathconf_sz (compound_encode_hdr_maxsz + \ 536#define NFS4_enc_pathconf_sz (compound_encode_hdr_maxsz + \
537 encode_sequence_maxsz + \
482 encode_putfh_maxsz + \ 538 encode_putfh_maxsz + \
483 encode_getattr_maxsz) 539 encode_getattr_maxsz)
484#define NFS4_dec_pathconf_sz (compound_decode_hdr_maxsz + \ 540#define NFS4_dec_pathconf_sz (compound_decode_hdr_maxsz + \
541 decode_sequence_maxsz + \
485 decode_putfh_maxsz + \ 542 decode_putfh_maxsz + \
486 decode_getattr_maxsz) 543 decode_getattr_maxsz)
487#define NFS4_enc_statfs_sz (compound_encode_hdr_maxsz + \ 544#define NFS4_enc_statfs_sz (compound_encode_hdr_maxsz + \
545 encode_sequence_maxsz + \
488 encode_putfh_maxsz + \ 546 encode_putfh_maxsz + \
489 encode_statfs_maxsz) 547 encode_statfs_maxsz)
490#define NFS4_dec_statfs_sz (compound_decode_hdr_maxsz + \ 548#define NFS4_dec_statfs_sz (compound_decode_hdr_maxsz + \
549 decode_sequence_maxsz + \
491 decode_putfh_maxsz + \ 550 decode_putfh_maxsz + \
492 decode_statfs_maxsz) 551 decode_statfs_maxsz)
493#define NFS4_enc_server_caps_sz (compound_encode_hdr_maxsz + \ 552#define NFS4_enc_server_caps_sz (compound_encode_hdr_maxsz + \
553 encode_sequence_maxsz + \
494 encode_putfh_maxsz + \ 554 encode_putfh_maxsz + \
495 encode_getattr_maxsz) 555 encode_getattr_maxsz)
496#define NFS4_dec_server_caps_sz (compound_decode_hdr_maxsz + \ 556#define NFS4_dec_server_caps_sz (compound_decode_hdr_maxsz + \
557 decode_sequence_maxsz + \
497 decode_putfh_maxsz + \ 558 decode_putfh_maxsz + \
498 decode_getattr_maxsz) 559 decode_getattr_maxsz)
499#define NFS4_enc_delegreturn_sz (compound_encode_hdr_maxsz + \ 560#define NFS4_enc_delegreturn_sz (compound_encode_hdr_maxsz + \
561 encode_sequence_maxsz + \
500 encode_putfh_maxsz + \ 562 encode_putfh_maxsz + \
501 encode_delegreturn_maxsz + \ 563 encode_delegreturn_maxsz + \
502 encode_getattr_maxsz) 564 encode_getattr_maxsz)
503#define NFS4_dec_delegreturn_sz (compound_decode_hdr_maxsz + \ 565#define NFS4_dec_delegreturn_sz (compound_decode_hdr_maxsz + \
566 decode_sequence_maxsz + \
504 decode_delegreturn_maxsz + \ 567 decode_delegreturn_maxsz + \
505 decode_getattr_maxsz) 568 decode_getattr_maxsz)
506#define NFS4_enc_getacl_sz (compound_encode_hdr_maxsz + \ 569#define NFS4_enc_getacl_sz (compound_encode_hdr_maxsz + \
570 encode_sequence_maxsz + \
507 encode_putfh_maxsz + \ 571 encode_putfh_maxsz + \
508 encode_getacl_maxsz) 572 encode_getacl_maxsz)
509#define NFS4_dec_getacl_sz (compound_decode_hdr_maxsz + \ 573#define NFS4_dec_getacl_sz (compound_decode_hdr_maxsz + \
574 decode_sequence_maxsz + \
510 decode_putfh_maxsz + \ 575 decode_putfh_maxsz + \
511 decode_getacl_maxsz) 576 decode_getacl_maxsz)
512#define NFS4_enc_setacl_sz (compound_encode_hdr_maxsz + \ 577#define NFS4_enc_setacl_sz (compound_encode_hdr_maxsz + \
578 encode_sequence_maxsz + \
513 encode_putfh_maxsz + \ 579 encode_putfh_maxsz + \
514 encode_setacl_maxsz) 580 encode_setacl_maxsz)
515#define NFS4_dec_setacl_sz (compound_decode_hdr_maxsz + \ 581#define NFS4_dec_setacl_sz (compound_decode_hdr_maxsz + \
582 decode_sequence_maxsz + \
516 decode_putfh_maxsz + \ 583 decode_putfh_maxsz + \
517 decode_setacl_maxsz) 584 decode_setacl_maxsz)
518#define NFS4_enc_fs_locations_sz \ 585#define NFS4_enc_fs_locations_sz \
519 (compound_encode_hdr_maxsz + \ 586 (compound_encode_hdr_maxsz + \
587 encode_sequence_maxsz + \
520 encode_putfh_maxsz + \ 588 encode_putfh_maxsz + \
521 encode_lookup_maxsz + \ 589 encode_lookup_maxsz + \
522 encode_fs_locations_maxsz) 590 encode_fs_locations_maxsz)
523#define NFS4_dec_fs_locations_sz \ 591#define NFS4_dec_fs_locations_sz \
524 (compound_decode_hdr_maxsz + \ 592 (compound_decode_hdr_maxsz + \
593 decode_sequence_maxsz + \
525 decode_putfh_maxsz + \ 594 decode_putfh_maxsz + \
526 decode_lookup_maxsz + \ 595 decode_lookup_maxsz + \
527 decode_fs_locations_maxsz) 596 decode_fs_locations_maxsz)
@@ -1385,6 +1454,24 @@ static void encode_delegreturn(struct xdr_stream *xdr, const nfs4_stateid *state
1385 hdr->nops++; 1454 hdr->nops++;
1386 hdr->replen += decode_delegreturn_maxsz; 1455 hdr->replen += decode_delegreturn_maxsz;
1387} 1456}
1457
1458/* NFSv4.1 operations */
1459static void encode_sequence(struct xdr_stream *xdr,
1460 const struct nfs4_sequence_args *args,
1461 struct compound_hdr *hdr)
1462{
1463#if defined(CONFIG_NFS_V4_1)
1464 struct nfs4_session *session = args->sa_session;
1465
1466 if (!session)
1467 return;
1468
1469 /* stub */
1470 hdr->nops++;
1471 hdr->replen += decode_sequence_maxsz;
1472#endif /* CONFIG_NFS_V4_1 */
1473}
1474
1388/* 1475/*
1389 * END OF "GENERIC" ENCODE ROUTINES. 1476 * END OF "GENERIC" ENCODE ROUTINES.
1390 */ 1477 */
@@ -1410,6 +1497,7 @@ static int nfs4_xdr_enc_access(struct rpc_rqst *req, __be32 *p, const struct nfs
1410 1497
1411 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1498 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1412 encode_compound_hdr(&xdr, req, &hdr); 1499 encode_compound_hdr(&xdr, req, &hdr);
1500 encode_sequence(&xdr, &args->seq_args, &hdr);
1413 encode_putfh(&xdr, args->fh, &hdr); 1501 encode_putfh(&xdr, args->fh, &hdr);
1414 encode_access(&xdr, args->access, &hdr); 1502 encode_access(&xdr, args->access, &hdr);
1415 encode_getfattr(&xdr, args->bitmask, &hdr); 1503 encode_getfattr(&xdr, args->bitmask, &hdr);
@@ -1429,6 +1517,7 @@ static int nfs4_xdr_enc_lookup(struct rpc_rqst *req, __be32 *p, const struct nfs
1429 1517
1430 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1518 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1431 encode_compound_hdr(&xdr, req, &hdr); 1519 encode_compound_hdr(&xdr, req, &hdr);
1520 encode_sequence(&xdr, &args->seq_args, &hdr);
1432 encode_putfh(&xdr, args->dir_fh, &hdr); 1521 encode_putfh(&xdr, args->dir_fh, &hdr);
1433 encode_lookup(&xdr, args->name, &hdr); 1522 encode_lookup(&xdr, args->name, &hdr);
1434 encode_getfh(&xdr, &hdr); 1523 encode_getfh(&xdr, &hdr);
@@ -1449,6 +1538,7 @@ static int nfs4_xdr_enc_lookup_root(struct rpc_rqst *req, __be32 *p, const struc
1449 1538
1450 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1539 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1451 encode_compound_hdr(&xdr, req, &hdr); 1540 encode_compound_hdr(&xdr, req, &hdr);
1541 encode_sequence(&xdr, &args->seq_args, &hdr);
1452 encode_putrootfh(&xdr, &hdr); 1542 encode_putrootfh(&xdr, &hdr);
1453 encode_getfh(&xdr, &hdr); 1543 encode_getfh(&xdr, &hdr);
1454 encode_getfattr(&xdr, args->bitmask, &hdr); 1544 encode_getfattr(&xdr, args->bitmask, &hdr);
@@ -1468,6 +1558,7 @@ static int nfs4_xdr_enc_remove(struct rpc_rqst *req, __be32 *p, const struct nfs
1468 1558
1469 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1559 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1470 encode_compound_hdr(&xdr, req, &hdr); 1560 encode_compound_hdr(&xdr, req, &hdr);
1561 encode_sequence(&xdr, &args->seq_args, &hdr);
1471 encode_putfh(&xdr, args->fh, &hdr); 1562 encode_putfh(&xdr, args->fh, &hdr);
1472 encode_remove(&xdr, &args->name, &hdr); 1563 encode_remove(&xdr, &args->name, &hdr);
1473 encode_getfattr(&xdr, args->bitmask, &hdr); 1564 encode_getfattr(&xdr, args->bitmask, &hdr);
@@ -1487,6 +1578,7 @@ static int nfs4_xdr_enc_rename(struct rpc_rqst *req, __be32 *p, const struct nfs
1487 1578
1488 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1579 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1489 encode_compound_hdr(&xdr, req, &hdr); 1580 encode_compound_hdr(&xdr, req, &hdr);
1581 encode_sequence(&xdr, &args->seq_args, &hdr);
1490 encode_putfh(&xdr, args->old_dir, &hdr); 1582 encode_putfh(&xdr, args->old_dir, &hdr);
1491 encode_savefh(&xdr, &hdr); 1583 encode_savefh(&xdr, &hdr);
1492 encode_putfh(&xdr, args->new_dir, &hdr); 1584 encode_putfh(&xdr, args->new_dir, &hdr);
@@ -1510,6 +1602,7 @@ static int nfs4_xdr_enc_link(struct rpc_rqst *req, __be32 *p, const struct nfs4_
1510 1602
1511 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1603 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1512 encode_compound_hdr(&xdr, req, &hdr); 1604 encode_compound_hdr(&xdr, req, &hdr);
1605 encode_sequence(&xdr, &args->seq_args, &hdr);
1513 encode_putfh(&xdr, args->fh, &hdr); 1606 encode_putfh(&xdr, args->fh, &hdr);
1514 encode_savefh(&xdr, &hdr); 1607 encode_savefh(&xdr, &hdr);
1515 encode_putfh(&xdr, args->dir_fh, &hdr); 1608 encode_putfh(&xdr, args->dir_fh, &hdr);
@@ -1533,6 +1626,7 @@ static int nfs4_xdr_enc_create(struct rpc_rqst *req, __be32 *p, const struct nfs
1533 1626
1534 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1627 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1535 encode_compound_hdr(&xdr, req, &hdr); 1628 encode_compound_hdr(&xdr, req, &hdr);
1629 encode_sequence(&xdr, &args->seq_args, &hdr);
1536 encode_putfh(&xdr, args->dir_fh, &hdr); 1630 encode_putfh(&xdr, args->dir_fh, &hdr);
1537 encode_savefh(&xdr, &hdr); 1631 encode_savefh(&xdr, &hdr);
1538 encode_create(&xdr, args, &hdr); 1632 encode_create(&xdr, args, &hdr);
@@ -1564,6 +1658,7 @@ static int nfs4_xdr_enc_getattr(struct rpc_rqst *req, __be32 *p, const struct nf
1564 1658
1565 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1659 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1566 encode_compound_hdr(&xdr, req, &hdr); 1660 encode_compound_hdr(&xdr, req, &hdr);
1661 encode_sequence(&xdr, &args->seq_args, &hdr);
1567 encode_putfh(&xdr, args->fh, &hdr); 1662 encode_putfh(&xdr, args->fh, &hdr);
1568 encode_getfattr(&xdr, args->bitmask, &hdr); 1663 encode_getfattr(&xdr, args->bitmask, &hdr);
1569 encode_nops(&hdr); 1664 encode_nops(&hdr);
@@ -1582,6 +1677,7 @@ static int nfs4_xdr_enc_close(struct rpc_rqst *req, __be32 *p, struct nfs_closea
1582 1677
1583 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1678 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1584 encode_compound_hdr(&xdr, req, &hdr); 1679 encode_compound_hdr(&xdr, req, &hdr);
1680 encode_sequence(&xdr, &args->seq_args, &hdr);
1585 encode_putfh(&xdr, args->fh, &hdr); 1681 encode_putfh(&xdr, args->fh, &hdr);
1586 encode_close(&xdr, args, &hdr); 1682 encode_close(&xdr, args, &hdr);
1587 encode_getfattr(&xdr, args->bitmask, &hdr); 1683 encode_getfattr(&xdr, args->bitmask, &hdr);
@@ -1601,6 +1697,7 @@ static int nfs4_xdr_enc_open(struct rpc_rqst *req, __be32 *p, struct nfs_openarg
1601 1697
1602 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1698 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1603 encode_compound_hdr(&xdr, req, &hdr); 1699 encode_compound_hdr(&xdr, req, &hdr);
1700 encode_sequence(&xdr, &args->seq_args, &hdr);
1604 encode_putfh(&xdr, args->fh, &hdr); 1701 encode_putfh(&xdr, args->fh, &hdr);
1605 encode_savefh(&xdr, &hdr); 1702 encode_savefh(&xdr, &hdr);
1606 encode_open(&xdr, args, &hdr); 1703 encode_open(&xdr, args, &hdr);
@@ -1642,6 +1739,7 @@ static int nfs4_xdr_enc_open_noattr(struct rpc_rqst *req, __be32 *p, struct nfs_
1642 1739
1643 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1740 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1644 encode_compound_hdr(&xdr, req, &hdr); 1741 encode_compound_hdr(&xdr, req, &hdr);
1742 encode_sequence(&xdr, &args->seq_args, &hdr);
1645 encode_putfh(&xdr, args->fh, &hdr); 1743 encode_putfh(&xdr, args->fh, &hdr);
1646 encode_open(&xdr, args, &hdr); 1744 encode_open(&xdr, args, &hdr);
1647 encode_getfattr(&xdr, args->bitmask, &hdr); 1745 encode_getfattr(&xdr, args->bitmask, &hdr);
@@ -1661,6 +1759,7 @@ static int nfs4_xdr_enc_open_downgrade(struct rpc_rqst *req, __be32 *p, struct n
1661 1759
1662 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1760 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1663 encode_compound_hdr(&xdr, req, &hdr); 1761 encode_compound_hdr(&xdr, req, &hdr);
1762 encode_sequence(&xdr, &args->seq_args, &hdr);
1664 encode_putfh(&xdr, args->fh, &hdr); 1763 encode_putfh(&xdr, args->fh, &hdr);
1665 encode_open_downgrade(&xdr, args, &hdr); 1764 encode_open_downgrade(&xdr, args, &hdr);
1666 encode_getfattr(&xdr, args->bitmask, &hdr); 1765 encode_getfattr(&xdr, args->bitmask, &hdr);
@@ -1680,6 +1779,7 @@ static int nfs4_xdr_enc_lock(struct rpc_rqst *req, __be32 *p, struct nfs_lock_ar
1680 1779
1681 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1780 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1682 encode_compound_hdr(&xdr, req, &hdr); 1781 encode_compound_hdr(&xdr, req, &hdr);
1782 encode_sequence(&xdr, &args->seq_args, &hdr);
1683 encode_putfh(&xdr, args->fh, &hdr); 1783 encode_putfh(&xdr, args->fh, &hdr);
1684 encode_lock(&xdr, args, &hdr); 1784 encode_lock(&xdr, args, &hdr);
1685 encode_nops(&hdr); 1785 encode_nops(&hdr);
@@ -1698,6 +1798,7 @@ static int nfs4_xdr_enc_lockt(struct rpc_rqst *req, __be32 *p, struct nfs_lockt_
1698 1798
1699 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1799 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1700 encode_compound_hdr(&xdr, req, &hdr); 1800 encode_compound_hdr(&xdr, req, &hdr);
1801 encode_sequence(&xdr, &args->seq_args, &hdr);
1701 encode_putfh(&xdr, args->fh, &hdr); 1802 encode_putfh(&xdr, args->fh, &hdr);
1702 encode_lockt(&xdr, args, &hdr); 1803 encode_lockt(&xdr, args, &hdr);
1703 encode_nops(&hdr); 1804 encode_nops(&hdr);
@@ -1716,6 +1817,7 @@ static int nfs4_xdr_enc_locku(struct rpc_rqst *req, __be32 *p, struct nfs_locku_
1716 1817
1717 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1818 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1718 encode_compound_hdr(&xdr, req, &hdr); 1819 encode_compound_hdr(&xdr, req, &hdr);
1820 encode_sequence(&xdr, &args->seq_args, &hdr);
1719 encode_putfh(&xdr, args->fh, &hdr); 1821 encode_putfh(&xdr, args->fh, &hdr);
1720 encode_locku(&xdr, args, &hdr); 1822 encode_locku(&xdr, args, &hdr);
1721 encode_nops(&hdr); 1823 encode_nops(&hdr);
@@ -1734,6 +1836,7 @@ static int nfs4_xdr_enc_readlink(struct rpc_rqst *req, __be32 *p, const struct n
1734 1836
1735 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1837 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1736 encode_compound_hdr(&xdr, req, &hdr); 1838 encode_compound_hdr(&xdr, req, &hdr);
1839 encode_sequence(&xdr, &args->seq_args, &hdr);
1737 encode_putfh(&xdr, args->fh, &hdr); 1840 encode_putfh(&xdr, args->fh, &hdr);
1738 encode_readlink(&xdr, args, req, &hdr); 1841 encode_readlink(&xdr, args, req, &hdr);
1739 1842
@@ -1755,6 +1858,7 @@ static int nfs4_xdr_enc_readdir(struct rpc_rqst *req, __be32 *p, const struct nf
1755 1858
1756 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1859 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1757 encode_compound_hdr(&xdr, req, &hdr); 1860 encode_compound_hdr(&xdr, req, &hdr);
1861 encode_sequence(&xdr, &args->seq_args, &hdr);
1758 encode_putfh(&xdr, args->fh, &hdr); 1862 encode_putfh(&xdr, args->fh, &hdr);
1759 encode_readdir(&xdr, args, req, &hdr); 1863 encode_readdir(&xdr, args, req, &hdr);
1760 1864
@@ -1779,6 +1883,7 @@ static int nfs4_xdr_enc_read(struct rpc_rqst *req, __be32 *p, struct nfs_readarg
1779 1883
1780 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1884 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1781 encode_compound_hdr(&xdr, req, &hdr); 1885 encode_compound_hdr(&xdr, req, &hdr);
1886 encode_sequence(&xdr, &args->seq_args, &hdr);
1782 encode_putfh(&xdr, args->fh, &hdr); 1887 encode_putfh(&xdr, args->fh, &hdr);
1783 encode_read(&xdr, args, &hdr); 1888 encode_read(&xdr, args, &hdr);
1784 1889
@@ -1801,6 +1906,7 @@ static int nfs4_xdr_enc_setattr(struct rpc_rqst *req, __be32 *p, struct nfs_seta
1801 1906
1802 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1907 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1803 encode_compound_hdr(&xdr, req, &hdr); 1908 encode_compound_hdr(&xdr, req, &hdr);
1909 encode_sequence(&xdr, &args->seq_args, &hdr);
1804 encode_putfh(&xdr, args->fh, &hdr); 1910 encode_putfh(&xdr, args->fh, &hdr);
1805 encode_setattr(&xdr, args, args->server, &hdr); 1911 encode_setattr(&xdr, args, args->server, &hdr);
1806 encode_getfattr(&xdr, args->bitmask, &hdr); 1912 encode_getfattr(&xdr, args->bitmask, &hdr);
@@ -1823,6 +1929,7 @@ nfs4_xdr_enc_getacl(struct rpc_rqst *req, __be32 *p,
1823 1929
1824 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1930 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1825 encode_compound_hdr(&xdr, req, &hdr); 1931 encode_compound_hdr(&xdr, req, &hdr);
1932 encode_sequence(&xdr, &args->seq_args, &hdr);
1826 encode_putfh(&xdr, args->fh, &hdr); 1933 encode_putfh(&xdr, args->fh, &hdr);
1827 replen = hdr.replen + nfs4_fattr_bitmap_maxsz + 1; 1934 replen = hdr.replen + nfs4_fattr_bitmap_maxsz + 1;
1828 encode_getattr_two(&xdr, FATTR4_WORD0_ACL, 0, &hdr); 1935 encode_getattr_two(&xdr, FATTR4_WORD0_ACL, 0, &hdr);
@@ -1845,6 +1952,7 @@ static int nfs4_xdr_enc_write(struct rpc_rqst *req, __be32 *p, struct nfs_writea
1845 1952
1846 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1953 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1847 encode_compound_hdr(&xdr, req, &hdr); 1954 encode_compound_hdr(&xdr, req, &hdr);
1955 encode_sequence(&xdr, &args->seq_args, &hdr);
1848 encode_putfh(&xdr, args->fh, &hdr); 1956 encode_putfh(&xdr, args->fh, &hdr);
1849 encode_write(&xdr, args, &hdr); 1957 encode_write(&xdr, args, &hdr);
1850 req->rq_snd_buf.flags |= XDRBUF_WRITE; 1958 req->rq_snd_buf.flags |= XDRBUF_WRITE;
@@ -1865,6 +1973,7 @@ static int nfs4_xdr_enc_commit(struct rpc_rqst *req, __be32 *p, struct nfs_write
1865 1973
1866 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1974 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1867 encode_compound_hdr(&xdr, req, &hdr); 1975 encode_compound_hdr(&xdr, req, &hdr);
1976 encode_sequence(&xdr, &args->seq_args, &hdr);
1868 encode_putfh(&xdr, args->fh, &hdr); 1977 encode_putfh(&xdr, args->fh, &hdr);
1869 encode_commit(&xdr, args, &hdr); 1978 encode_commit(&xdr, args, &hdr);
1870 encode_getfattr(&xdr, args->bitmask, &hdr); 1979 encode_getfattr(&xdr, args->bitmask, &hdr);
@@ -1884,6 +1993,7 @@ static int nfs4_xdr_enc_fsinfo(struct rpc_rqst *req, __be32 *p, struct nfs4_fsin
1884 1993
1885 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1994 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1886 encode_compound_hdr(&xdr, req, &hdr); 1995 encode_compound_hdr(&xdr, req, &hdr);
1996 encode_sequence(&xdr, &args->seq_args, &hdr);
1887 encode_putfh(&xdr, args->fh, &hdr); 1997 encode_putfh(&xdr, args->fh, &hdr);
1888 encode_fsinfo(&xdr, args->bitmask, &hdr); 1998 encode_fsinfo(&xdr, args->bitmask, &hdr);
1889 encode_nops(&hdr); 1999 encode_nops(&hdr);
@@ -1902,6 +2012,7 @@ static int nfs4_xdr_enc_pathconf(struct rpc_rqst *req, __be32 *p, const struct n
1902 2012
1903 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 2013 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1904 encode_compound_hdr(&xdr, req, &hdr); 2014 encode_compound_hdr(&xdr, req, &hdr);
2015 encode_sequence(&xdr, &args->seq_args, &hdr);
1905 encode_putfh(&xdr, args->fh, &hdr); 2016 encode_putfh(&xdr, args->fh, &hdr);
1906 encode_getattr_one(&xdr, args->bitmask[0] & nfs4_pathconf_bitmap[0], 2017 encode_getattr_one(&xdr, args->bitmask[0] & nfs4_pathconf_bitmap[0],
1907 &hdr); 2018 &hdr);
@@ -1921,6 +2032,7 @@ static int nfs4_xdr_enc_statfs(struct rpc_rqst *req, __be32 *p, const struct nfs
1921 2032
1922 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 2033 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1923 encode_compound_hdr(&xdr, req, &hdr); 2034 encode_compound_hdr(&xdr, req, &hdr);
2035 encode_sequence(&xdr, &args->seq_args, &hdr);
1924 encode_putfh(&xdr, args->fh, &hdr); 2036 encode_putfh(&xdr, args->fh, &hdr);
1925 encode_getattr_two(&xdr, args->bitmask[0] & nfs4_statfs_bitmap[0], 2037 encode_getattr_two(&xdr, args->bitmask[0] & nfs4_statfs_bitmap[0],
1926 args->bitmask[1] & nfs4_statfs_bitmap[1], &hdr); 2038 args->bitmask[1] & nfs4_statfs_bitmap[1], &hdr);
@@ -1941,6 +2053,7 @@ static int nfs4_xdr_enc_server_caps(struct rpc_rqst *req, __be32 *p,
1941 2053
1942 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 2054 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1943 encode_compound_hdr(&xdr, req, &hdr); 2055 encode_compound_hdr(&xdr, req, &hdr);
2056 encode_sequence(&xdr, &args->seq_args, &hdr);
1944 encode_putfh(&xdr, args->fhandle, &hdr); 2057 encode_putfh(&xdr, args->fhandle, &hdr);
1945 encode_getattr_one(&xdr, FATTR4_WORD0_SUPPORTED_ATTRS| 2058 encode_getattr_one(&xdr, FATTR4_WORD0_SUPPORTED_ATTRS|
1946 FATTR4_WORD0_LINK_SUPPORT| 2059 FATTR4_WORD0_LINK_SUPPORT|
@@ -2016,6 +2129,7 @@ static int nfs4_xdr_enc_delegreturn(struct rpc_rqst *req, __be32 *p, const struc
2016 2129
2017 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 2130 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
2018 encode_compound_hdr(&xdr, req, &hdr); 2131 encode_compound_hdr(&xdr, req, &hdr);
2132 encode_sequence(&xdr, &args->seq_args, &hdr);
2019 encode_putfh(&xdr, args->fhandle, &hdr); 2133 encode_putfh(&xdr, args->fhandle, &hdr);
2020 encode_delegreturn(&xdr, args->stateid, &hdr); 2134 encode_delegreturn(&xdr, args->stateid, &hdr);
2021 encode_getfattr(&xdr, args->bitmask, &hdr); 2135 encode_getfattr(&xdr, args->bitmask, &hdr);
@@ -2036,6 +2150,7 @@ static int nfs4_xdr_enc_fs_locations(struct rpc_rqst *req, __be32 *p, struct nfs
2036 2150
2037 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 2151 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
2038 encode_compound_hdr(&xdr, req, &hdr); 2152 encode_compound_hdr(&xdr, req, &hdr);
2153 encode_sequence(&xdr, &args->seq_args, &hdr);
2039 encode_putfh(&xdr, args->dir_fh, &hdr); 2154 encode_putfh(&xdr, args->dir_fh, &hdr);
2040 encode_lookup(&xdr, args->name, &hdr); 2155 encode_lookup(&xdr, args->name, &hdr);
2041 replen = hdr.replen; /* get the attribute into args->page */ 2156 replen = hdr.replen; /* get the attribute into args->page */
@@ -3762,6 +3877,20 @@ static int decode_delegreturn(struct xdr_stream *xdr)
3762 return decode_op_hdr(xdr, OP_DELEGRETURN); 3877 return decode_op_hdr(xdr, OP_DELEGRETURN);
3763} 3878}
3764 3879
3880static int decode_sequence(struct xdr_stream *xdr,
3881 struct nfs4_sequence_res *res,
3882 struct rpc_rqst *rqstp)
3883{
3884#if defined(CONFIG_NFS_V4_1)
3885 if (!res->sr_session)
3886 return 0;
3887
3888 /* stub */
3889#endif /* CONFIG_NFS_V4_1 */
3890
3891 return 0;
3892}
3893
3765/* 3894/*
3766 * END OF "GENERIC" DECODE ROUTINES. 3895 * END OF "GENERIC" DECODE ROUTINES.
3767 */ 3896 */
@@ -3779,6 +3908,9 @@ static int nfs4_xdr_dec_open_downgrade(struct rpc_rqst *rqstp, __be32 *p, struct
3779 status = decode_compound_hdr(&xdr, &hdr); 3908 status = decode_compound_hdr(&xdr, &hdr);
3780 if (status) 3909 if (status)
3781 goto out; 3910 goto out;
3911 status = decode_sequence(&xdr, &res->seq_res, rqstp);
3912 if (status)
3913 goto out;
3782 status = decode_putfh(&xdr); 3914 status = decode_putfh(&xdr);
3783 if (status) 3915 if (status)
3784 goto out; 3916 goto out;
@@ -3800,7 +3932,11 @@ static int nfs4_xdr_dec_access(struct rpc_rqst *rqstp, __be32 *p, struct nfs4_ac
3800 int status; 3932 int status;
3801 3933
3802 xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p); 3934 xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
3803 if ((status = decode_compound_hdr(&xdr, &hdr)) != 0) 3935 status = decode_compound_hdr(&xdr, &hdr);
3936 if (status)
3937 goto out;
3938 status = decode_sequence(&xdr, &res->seq_res, rqstp);
3939 if (status)
3804 goto out; 3940 goto out;
3805 status = decode_putfh(&xdr); 3941 status = decode_putfh(&xdr);
3806 if (status != 0) 3942 if (status != 0)
@@ -3823,7 +3959,11 @@ static int nfs4_xdr_dec_lookup(struct rpc_rqst *rqstp, __be32 *p, struct nfs4_lo
3823 int status; 3959 int status;
3824 3960
3825 xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p); 3961 xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
3826 if ((status = decode_compound_hdr(&xdr, &hdr)) != 0) 3962 status = decode_compound_hdr(&xdr, &hdr);
3963 if (status)
3964 goto out;
3965 status = decode_sequence(&xdr, &res->seq_res, rqstp);
3966 if (status)
3827 goto out; 3967 goto out;
3828 if ((status = decode_putfh(&xdr)) != 0) 3968 if ((status = decode_putfh(&xdr)) != 0)
3829 goto out; 3969 goto out;
@@ -3846,7 +3986,11 @@ static int nfs4_xdr_dec_lookup_root(struct rpc_rqst *rqstp, __be32 *p, struct nf
3846 int status; 3986 int status;
3847 3987
3848 xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p); 3988 xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
3849 if ((status = decode_compound_hdr(&xdr, &hdr)) != 0) 3989 status = decode_compound_hdr(&xdr, &hdr);
3990 if (status)
3991 goto out;
3992 status = decode_sequence(&xdr, &res->seq_res, rqstp);
3993 if (status)
3850 goto out; 3994 goto out;
3851 if ((status = decode_putrootfh(&xdr)) != 0) 3995 if ((status = decode_putrootfh(&xdr)) != 0)
3852 goto out; 3996 goto out;
@@ -3866,7 +4010,11 @@ static int nfs4_xdr_dec_remove(struct rpc_rqst *rqstp, __be32 *p, struct nfs_rem
3866 int status; 4010 int status;
3867 4011
3868 xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p); 4012 xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
3869 if ((status = decode_compound_hdr(&xdr, &hdr)) != 0) 4013 status = decode_compound_hdr(&xdr, &hdr);
4014 if (status)
4015 goto out;
4016 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4017 if (status)
3870 goto out; 4018 goto out;
3871 if ((status = decode_putfh(&xdr)) != 0) 4019 if ((status = decode_putfh(&xdr)) != 0)
3872 goto out; 4020 goto out;
@@ -3887,7 +4035,11 @@ static int nfs4_xdr_dec_rename(struct rpc_rqst *rqstp, __be32 *p, struct nfs4_re
3887 int status; 4035 int status;
3888 4036
3889 xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p); 4037 xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
3890 if ((status = decode_compound_hdr(&xdr, &hdr)) != 0) 4038 status = decode_compound_hdr(&xdr, &hdr);
4039 if (status)
4040 goto out;
4041 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4042 if (status)
3891 goto out; 4043 goto out;
3892 if ((status = decode_putfh(&xdr)) != 0) 4044 if ((status = decode_putfh(&xdr)) != 0)
3893 goto out; 4045 goto out;
@@ -3917,7 +4069,11 @@ static int nfs4_xdr_dec_link(struct rpc_rqst *rqstp, __be32 *p, struct nfs4_link
3917 int status; 4069 int status;
3918 4070
3919 xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p); 4071 xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
3920 if ((status = decode_compound_hdr(&xdr, &hdr)) != 0) 4072 status = decode_compound_hdr(&xdr, &hdr);
4073 if (status)
4074 goto out;
4075 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4076 if (status)
3921 goto out; 4077 goto out;
3922 if ((status = decode_putfh(&xdr)) != 0) 4078 if ((status = decode_putfh(&xdr)) != 0)
3923 goto out; 4079 goto out;
@@ -3950,7 +4106,11 @@ static int nfs4_xdr_dec_create(struct rpc_rqst *rqstp, __be32 *p, struct nfs4_cr
3950 int status; 4106 int status;
3951 4107
3952 xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p); 4108 xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
3953 if ((status = decode_compound_hdr(&xdr, &hdr)) != 0) 4109 status = decode_compound_hdr(&xdr, &hdr);
4110 if (status)
4111 goto out;
4112 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4113 if (status)
3954 goto out; 4114 goto out;
3955 if ((status = decode_putfh(&xdr)) != 0) 4115 if ((status = decode_putfh(&xdr)) != 0)
3956 goto out; 4116 goto out;
@@ -3990,6 +4150,9 @@ static int nfs4_xdr_dec_getattr(struct rpc_rqst *rqstp, __be32 *p, struct nfs4_g
3990 status = decode_compound_hdr(&xdr, &hdr); 4150 status = decode_compound_hdr(&xdr, &hdr);
3991 if (status) 4151 if (status)
3992 goto out; 4152 goto out;
4153 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4154 if (status)
4155 goto out;
3993 status = decode_putfh(&xdr); 4156 status = decode_putfh(&xdr);
3994 if (status) 4157 if (status)
3995 goto out; 4158 goto out;
@@ -4012,6 +4175,7 @@ nfs4_xdr_enc_setacl(struct rpc_rqst *req, __be32 *p, struct nfs_setaclargs *args
4012 4175
4013 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 4176 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
4014 encode_compound_hdr(&xdr, req, &hdr); 4177 encode_compound_hdr(&xdr, req, &hdr);
4178 encode_sequence(&xdr, &args->seq_args, &hdr);
4015 encode_putfh(&xdr, args->fh, &hdr); 4179 encode_putfh(&xdr, args->fh, &hdr);
4016 status = encode_setacl(&xdr, args, &hdr); 4180 status = encode_setacl(&xdr, args, &hdr);
4017 encode_nops(&hdr); 4181 encode_nops(&hdr);
@@ -4033,6 +4197,9 @@ nfs4_xdr_dec_setacl(struct rpc_rqst *rqstp, __be32 *p,
4033 status = decode_compound_hdr(&xdr, &hdr); 4197 status = decode_compound_hdr(&xdr, &hdr);
4034 if (status) 4198 if (status)
4035 goto out; 4199 goto out;
4200 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4201 if (status)
4202 goto out;
4036 status = decode_putfh(&xdr); 4203 status = decode_putfh(&xdr);
4037 if (status) 4204 if (status)
4038 goto out; 4205 goto out;
@@ -4056,6 +4223,9 @@ nfs4_xdr_dec_getacl(struct rpc_rqst *rqstp, __be32 *p,
4056 status = decode_compound_hdr(&xdr, &hdr); 4223 status = decode_compound_hdr(&xdr, &hdr);
4057 if (status) 4224 if (status)
4058 goto out; 4225 goto out;
4226 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4227 if (status)
4228 goto out;
4059 status = decode_putfh(&xdr); 4229 status = decode_putfh(&xdr);
4060 if (status) 4230 if (status)
4061 goto out; 4231 goto out;
@@ -4078,6 +4248,9 @@ static int nfs4_xdr_dec_close(struct rpc_rqst *rqstp, __be32 *p, struct nfs_clos
4078 status = decode_compound_hdr(&xdr, &hdr); 4248 status = decode_compound_hdr(&xdr, &hdr);
4079 if (status) 4249 if (status)
4080 goto out; 4250 goto out;
4251 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4252 if (status)
4253 goto out;
4081 status = decode_putfh(&xdr); 4254 status = decode_putfh(&xdr);
4082 if (status) 4255 if (status)
4083 goto out; 4256 goto out;
@@ -4108,6 +4281,9 @@ static int nfs4_xdr_dec_open(struct rpc_rqst *rqstp, __be32 *p, struct nfs_openr
4108 status = decode_compound_hdr(&xdr, &hdr); 4281 status = decode_compound_hdr(&xdr, &hdr);
4109 if (status) 4282 if (status)
4110 goto out; 4283 goto out;
4284 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4285 if (status)
4286 goto out;
4111 status = decode_putfh(&xdr); 4287 status = decode_putfh(&xdr);
4112 if (status) 4288 if (status)
4113 goto out; 4289 goto out;
@@ -4162,6 +4338,9 @@ static int nfs4_xdr_dec_open_noattr(struct rpc_rqst *rqstp, __be32 *p, struct nf
4162 status = decode_compound_hdr(&xdr, &hdr); 4338 status = decode_compound_hdr(&xdr, &hdr);
4163 if (status) 4339 if (status)
4164 goto out; 4340 goto out;
4341 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4342 if (status)
4343 goto out;
4165 status = decode_putfh(&xdr); 4344 status = decode_putfh(&xdr);
4166 if (status) 4345 if (status)
4167 goto out; 4346 goto out;
@@ -4186,6 +4365,9 @@ static int nfs4_xdr_dec_setattr(struct rpc_rqst *rqstp, __be32 *p, struct nfs_se
4186 status = decode_compound_hdr(&xdr, &hdr); 4365 status = decode_compound_hdr(&xdr, &hdr);
4187 if (status) 4366 if (status)
4188 goto out; 4367 goto out;
4368 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4369 if (status)
4370 goto out;
4189 status = decode_putfh(&xdr); 4371 status = decode_putfh(&xdr);
4190 if (status) 4372 if (status)
4191 goto out; 4373 goto out;
@@ -4210,6 +4392,9 @@ static int nfs4_xdr_dec_lock(struct rpc_rqst *rqstp, __be32 *p, struct nfs_lock_
4210 status = decode_compound_hdr(&xdr, &hdr); 4392 status = decode_compound_hdr(&xdr, &hdr);
4211 if (status) 4393 if (status)
4212 goto out; 4394 goto out;
4395 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4396 if (status)
4397 goto out;
4213 status = decode_putfh(&xdr); 4398 status = decode_putfh(&xdr);
4214 if (status) 4399 if (status)
4215 goto out; 4400 goto out;
@@ -4231,6 +4416,9 @@ static int nfs4_xdr_dec_lockt(struct rpc_rqst *rqstp, __be32 *p, struct nfs_lock
4231 status = decode_compound_hdr(&xdr, &hdr); 4416 status = decode_compound_hdr(&xdr, &hdr);
4232 if (status) 4417 if (status)
4233 goto out; 4418 goto out;
4419 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4420 if (status)
4421 goto out;
4234 status = decode_putfh(&xdr); 4422 status = decode_putfh(&xdr);
4235 if (status) 4423 if (status)
4236 goto out; 4424 goto out;
@@ -4252,6 +4440,9 @@ static int nfs4_xdr_dec_locku(struct rpc_rqst *rqstp, __be32 *p, struct nfs_lock
4252 status = decode_compound_hdr(&xdr, &hdr); 4440 status = decode_compound_hdr(&xdr, &hdr);
4253 if (status) 4441 if (status)
4254 goto out; 4442 goto out;
4443 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4444 if (status)
4445 goto out;
4255 status = decode_putfh(&xdr); 4446 status = decode_putfh(&xdr);
4256 if (status) 4447 if (status)
4257 goto out; 4448 goto out;
@@ -4274,6 +4465,9 @@ static int nfs4_xdr_dec_readlink(struct rpc_rqst *rqstp, __be32 *p,
4274 status = decode_compound_hdr(&xdr, &hdr); 4465 status = decode_compound_hdr(&xdr, &hdr);
4275 if (status) 4466 if (status)
4276 goto out; 4467 goto out;
4468 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4469 if (status)
4470 goto out;
4277 status = decode_putfh(&xdr); 4471 status = decode_putfh(&xdr);
4278 if (status) 4472 if (status)
4279 goto out; 4473 goto out;
@@ -4295,6 +4489,9 @@ static int nfs4_xdr_dec_readdir(struct rpc_rqst *rqstp, __be32 *p, struct nfs4_r
4295 status = decode_compound_hdr(&xdr, &hdr); 4489 status = decode_compound_hdr(&xdr, &hdr);
4296 if (status) 4490 if (status)
4297 goto out; 4491 goto out;
4492 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4493 if (status)
4494 goto out;
4298 status = decode_putfh(&xdr); 4495 status = decode_putfh(&xdr);
4299 if (status) 4496 if (status)
4300 goto out; 4497 goto out;
@@ -4316,6 +4513,9 @@ static int nfs4_xdr_dec_read(struct rpc_rqst *rqstp, __be32 *p, struct nfs_readr
4316 status = decode_compound_hdr(&xdr, &hdr); 4513 status = decode_compound_hdr(&xdr, &hdr);
4317 if (status) 4514 if (status)
4318 goto out; 4515 goto out;
4516 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4517 if (status)
4518 goto out;
4319 status = decode_putfh(&xdr); 4519 status = decode_putfh(&xdr);
4320 if (status) 4520 if (status)
4321 goto out; 4521 goto out;
@@ -4339,6 +4539,9 @@ static int nfs4_xdr_dec_write(struct rpc_rqst *rqstp, __be32 *p, struct nfs_writ
4339 status = decode_compound_hdr(&xdr, &hdr); 4539 status = decode_compound_hdr(&xdr, &hdr);
4340 if (status) 4540 if (status)
4341 goto out; 4541 goto out;
4542 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4543 if (status)
4544 goto out;
4342 status = decode_putfh(&xdr); 4545 status = decode_putfh(&xdr);
4343 if (status) 4546 if (status)
4344 goto out; 4547 goto out;
@@ -4365,6 +4568,9 @@ static int nfs4_xdr_dec_commit(struct rpc_rqst *rqstp, __be32 *p, struct nfs_wri
4365 status = decode_compound_hdr(&xdr, &hdr); 4568 status = decode_compound_hdr(&xdr, &hdr);
4366 if (status) 4569 if (status)
4367 goto out; 4570 goto out;
4571 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4572 if (status)
4573 goto out;
4368 status = decode_putfh(&xdr); 4574 status = decode_putfh(&xdr);
4369 if (status) 4575 if (status)
4370 goto out; 4576 goto out;
@@ -4389,6 +4595,8 @@ static int nfs4_xdr_dec_fsinfo(struct rpc_rqst *req, __be32 *p,
4389 xdr_init_decode(&xdr, &req->rq_rcv_buf, p); 4595 xdr_init_decode(&xdr, &req->rq_rcv_buf, p);
4390 status = decode_compound_hdr(&xdr, &hdr); 4596 status = decode_compound_hdr(&xdr, &hdr);
4391 if (!status) 4597 if (!status)
4598 status = decode_sequence(&xdr, &res->seq_res, req);
4599 if (!status)
4392 status = decode_putfh(&xdr); 4600 status = decode_putfh(&xdr);
4393 if (!status) 4601 if (!status)
4394 status = decode_fsinfo(&xdr, res->fsinfo); 4602 status = decode_fsinfo(&xdr, res->fsinfo);
@@ -4408,6 +4616,8 @@ static int nfs4_xdr_dec_pathconf(struct rpc_rqst *req, __be32 *p,
4408 xdr_init_decode(&xdr, &req->rq_rcv_buf, p); 4616 xdr_init_decode(&xdr, &req->rq_rcv_buf, p);
4409 status = decode_compound_hdr(&xdr, &hdr); 4617 status = decode_compound_hdr(&xdr, &hdr);
4410 if (!status) 4618 if (!status)
4619 status = decode_sequence(&xdr, &res->seq_res, req);
4620 if (!status)
4411 status = decode_putfh(&xdr); 4621 status = decode_putfh(&xdr);
4412 if (!status) 4622 if (!status)
4413 status = decode_pathconf(&xdr, res->pathconf); 4623 status = decode_pathconf(&xdr, res->pathconf);
@@ -4427,6 +4637,8 @@ static int nfs4_xdr_dec_statfs(struct rpc_rqst *req, __be32 *p,
4427 xdr_init_decode(&xdr, &req->rq_rcv_buf, p); 4637 xdr_init_decode(&xdr, &req->rq_rcv_buf, p);
4428 status = decode_compound_hdr(&xdr, &hdr); 4638 status = decode_compound_hdr(&xdr, &hdr);
4429 if (!status) 4639 if (!status)
4640 status = decode_sequence(&xdr, &res->seq_res, req);
4641 if (!status)
4430 status = decode_putfh(&xdr); 4642 status = decode_putfh(&xdr);
4431 if (!status) 4643 if (!status)
4432 status = decode_statfs(&xdr, res->fsstat); 4644 status = decode_statfs(&xdr, res->fsstat);
@@ -4443,7 +4655,11 @@ static int nfs4_xdr_dec_server_caps(struct rpc_rqst *req, __be32 *p, struct nfs4
4443 int status; 4655 int status;
4444 4656
4445 xdr_init_decode(&xdr, &req->rq_rcv_buf, p); 4657 xdr_init_decode(&xdr, &req->rq_rcv_buf, p);
4446 if ((status = decode_compound_hdr(&xdr, &hdr)) != 0) 4658 status = decode_compound_hdr(&xdr, &hdr);
4659 if (status)
4660 goto out;
4661 status = decode_sequence(&xdr, &res->seq_res, req);
4662 if (status)
4447 goto out; 4663 goto out;
4448 if ((status = decode_putfh(&xdr)) != 0) 4664 if ((status = decode_putfh(&xdr)) != 0)
4449 goto out; 4665 goto out;
@@ -4516,7 +4732,10 @@ static int nfs4_xdr_dec_delegreturn(struct rpc_rqst *rqstp, __be32 *p, struct nf
4516 4732
4517 xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p); 4733 xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
4518 status = decode_compound_hdr(&xdr, &hdr); 4734 status = decode_compound_hdr(&xdr, &hdr);
4519 if (status != 0) 4735 if (status)
4736 goto out;
4737 status = decode_sequence(&xdr, &res->seq_res, rqstp);
4738 if (status)
4520 goto out; 4739 goto out;
4521 status = decode_putfh(&xdr); 4740 status = decode_putfh(&xdr);
4522 if (status != 0) 4741 if (status != 0)
@@ -4539,7 +4758,10 @@ static int nfs4_xdr_dec_fs_locations(struct rpc_rqst *req, __be32 *p,
4539 4758
4540 xdr_init_decode(&xdr, &req->rq_rcv_buf, p); 4759 xdr_init_decode(&xdr, &req->rq_rcv_buf, p);
4541 status = decode_compound_hdr(&xdr, &hdr); 4760 status = decode_compound_hdr(&xdr, &hdr);
4542 if (status != 0) 4761 if (status)
4762 goto out;
4763 status = decode_sequence(&xdr, &res->seq_res, req);
4764 if (status)
4543 goto out; 4765 goto out;
4544 if ((status = decode_putfh(&xdr)) != 0) 4766 if ((status = decode_putfh(&xdr)) != 0)
4545 goto out; 4767 goto out;