Commit 4163ee7
committed
NFSD: Insulate nfsd4_encode_fattr4() from page boundaries in the encode buffer
Commit ab04de6 ("NFSD: Optimize nfsd4_encode_fattr()") replaced
the use of write_bytes_to_xdr_buf() because it's expensive and the
data items to be encoded are already properly aligned.
However, there's no guarantee that the pointer returned from
xdr_reserve_space() will still point to the correct reserved space
in the encode buffer after one or more intervening calls to
xdr_reserve_space(). It just happens to work with the current
implementation of xdr_reserve_space().
This commit effectively reverts the optimization.
Reviewed-by: NeilBrown <neilb@suse.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>1 parent b786caa commit 4163ee7
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3507 | 3507 | | |
3508 | 3508 | | |
3509 | 3509 | | |
3510 | | - | |
3511 | | - | |
| 3510 | + | |
| 3511 | + | |
3512 | 3512 | | |
3513 | 3513 | | |
3514 | 3514 | | |
| |||
3629 | 3629 | | |
3630 | 3630 | | |
3631 | 3631 | | |
3632 | | - | |
3633 | | - | |
| 3632 | + | |
3634 | 3633 | | |
3635 | 3634 | | |
3636 | 3635 | | |
| |||
3640 | 3639 | | |
3641 | 3640 | | |
3642 | 3641 | | |
3643 | | - | |
| 3642 | + | |
| 3643 | + | |
3644 | 3644 | | |
3645 | 3645 | | |
3646 | 3646 | | |
| |||
0 commit comments