浏览代码

NFSv3: Don't open code stream position calculation in decode_getacl3resok

Use the new xdr_stream_pos() helper instead.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Trond Myklebust 13 年之前
父节点
当前提交
1aecca3e83
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/nfs/nfs3xdr.c

+ 1 - 1
fs/nfs/nfs3xdr.c

@@ -2341,7 +2341,7 @@ static inline int decode_getacl3resok(struct xdr_stream *xdr,
 	if (result->mask & ~(NFS_ACL|NFS_ACLCNT|NFS_DFACL|NFS_DFACLCNT))
 		goto out;
 
-	hdrlen = (u8 *)xdr->p - (u8 *)xdr->iov->iov_base;
+	hdrlen = xdr_stream_pos(xdr);
 
 	acl = NULL;
 	if (result->mask & NFS_ACL)