aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorFrank Sorenson <sorenson@redhat.com>2018-04-02 16:12:45 -0500
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2018-04-10 16:06:22 -0400
commit98de9ce6f6660d02aa72d7b9b17696fa68a2ed9b (patch)
tree982362bc07561f05a8bd60385b40fe29c8e713ae /net/sunrpc
parentNFSv3/acl: forget acl cache after setattr (diff)
downloadlinux-dev-98de9ce6f6660d02aa72d7b9b17696fa68a2ed9b.tar.xz
linux-dev-98de9ce6f6660d02aa72d7b9b17696fa68a2ed9b.zip
NFS: advance nfs_entry cookie only after decoding completes successfully
In nfs[34]_decode_dirent, the cookie is advanced as soon as it is read, but decoding may still fail later in the function, returning an error. Because the cookie has been advanced, the failing entry is not re-requested from the server, resulting in a missing directory entry. In addition, nfs v3 and v4 read the cookie at different locations in the xdr_stream, so the behavior of the two can be inconsistent. Fix these by reading the cookie into a temporary variable, and only advancing the cookie once the entire entry has been decoded from the xdr_stream successfully. Signed-off-by: Frank Sorenson <sorenson@redhat.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc')
0 files changed, 0 insertions, 0 deletions