diff options
-rw-r--r-- | fs/nfsd/nfs4state.c | 2 | ||||
-rw-r--r-- | net/sunrpc/xdr.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 3550a9c87616..c06a1ba80d73 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -3897,11 +3897,11 @@ nfs4_set_delegation(struct nfs4_client *clp, struct svc_fh *fh, | |||
3897 | status = nfs4_setlease(dp); | 3897 | status = nfs4_setlease(dp); |
3898 | goto out; | 3898 | goto out; |
3899 | } | 3899 | } |
3900 | atomic_inc(&fp->fi_delegees); | ||
3901 | if (fp->fi_had_conflict) { | 3900 | if (fp->fi_had_conflict) { |
3902 | status = -EAGAIN; | 3901 | status = -EAGAIN; |
3903 | goto out_unlock; | 3902 | goto out_unlock; |
3904 | } | 3903 | } |
3904 | atomic_inc(&fp->fi_delegees); | ||
3905 | hash_delegation_locked(dp, fp); | 3905 | hash_delegation_locked(dp, fp); |
3906 | status = 0; | 3906 | status = 0; |
3907 | out_unlock: | 3907 | out_unlock: |
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c index 1cb61242e55e..4439ac4c1b53 100644 --- a/net/sunrpc/xdr.c +++ b/net/sunrpc/xdr.c | |||
@@ -606,7 +606,7 @@ void xdr_truncate_encode(struct xdr_stream *xdr, size_t len) | |||
606 | struct kvec *head = buf->head; | 606 | struct kvec *head = buf->head; |
607 | struct kvec *tail = buf->tail; | 607 | struct kvec *tail = buf->tail; |
608 | int fraglen; | 608 | int fraglen; |
609 | int new, old; | 609 | int new; |
610 | 610 | ||
611 | if (len > buf->len) { | 611 | if (len > buf->len) { |
612 | WARN_ON_ONCE(1); | 612 | WARN_ON_ONCE(1); |
@@ -629,8 +629,8 @@ void xdr_truncate_encode(struct xdr_stream *xdr, size_t len) | |||
629 | buf->len -= fraglen; | 629 | buf->len -= fraglen; |
630 | 630 | ||
631 | new = buf->page_base + buf->page_len; | 631 | new = buf->page_base + buf->page_len; |
632 | old = new + fraglen; | 632 | |
633 | xdr->page_ptr -= (old >> PAGE_SHIFT) - (new >> PAGE_SHIFT); | 633 | xdr->page_ptr = buf->pages + (new >> PAGE_SHIFT); |
634 | 634 | ||
635 | if (buf->page_len) { | 635 | if (buf->page_len) { |
636 | xdr->p = page_address(*xdr->page_ptr); | 636 | xdr->p = page_address(*xdr->page_ptr); |