mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-03 15:55:38 +00:00
nfsd4: encode_rdattr_error cleanup
There's a simpler way to write this. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
6b6d8137f1
commit
87915c6472
1 changed files with 1 additions and 4 deletions
|
@ -2620,17 +2620,14 @@ out_put:
|
|||
static __be32 *
|
||||
nfsd4_encode_rdattr_error(__be32 *p, int buflen, __be32 nfserr)
|
||||
{
|
||||
__be32 *attrlenp;
|
||||
|
||||
if (buflen < 6)
|
||||
return NULL;
|
||||
*p++ = htonl(2);
|
||||
*p++ = htonl(FATTR4_WORD0_RDATTR_ERROR); /* bmval0 */
|
||||
*p++ = htonl(0); /* bmval1 */
|
||||
|
||||
attrlenp = p++;
|
||||
*p++ = htonl(4); /* attribute length */
|
||||
*p++ = nfserr; /* no htonl */
|
||||
*attrlenp = htonl((char *)p - (char *)attrlenp - 4);
|
||||
return p;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue