diff options
Diffstat (limited to 'fs/nfs/nfs2xdr.c')
-rw-r--r-- | fs/nfs/nfs2xdr.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c index d04f0df7be55..06b9df49f7f7 100644 --- a/fs/nfs/nfs2xdr.c +++ b/fs/nfs/nfs2xdr.c | |||
@@ -195,7 +195,6 @@ static void encode_fhandle(struct xdr_stream *xdr, const struct nfs_fh *fh) | |||
195 | { | 195 | { |
196 | __be32 *p; | 196 | __be32 *p; |
197 | 197 | ||
198 | BUG_ON(fh->size != NFS2_FHSIZE); | ||
199 | p = xdr_reserve_space(xdr, NFS2_FHSIZE); | 198 | p = xdr_reserve_space(xdr, NFS2_FHSIZE); |
200 | memcpy(p, fh->data, NFS2_FHSIZE); | 199 | memcpy(p, fh->data, NFS2_FHSIZE); |
201 | } | 200 | } |
@@ -388,7 +387,7 @@ static void encode_filename(struct xdr_stream *xdr, | |||
388 | { | 387 | { |
389 | __be32 *p; | 388 | __be32 *p; |
390 | 389 | ||
391 | BUG_ON(length > NFS2_MAXNAMLEN); | 390 | WARN_ON_ONCE(length > NFS2_MAXNAMLEN); |
392 | p = xdr_reserve_space(xdr, 4 + length); | 391 | p = xdr_reserve_space(xdr, 4 + length); |
393 | xdr_encode_opaque(p, name, length); | 392 | xdr_encode_opaque(p, name, length); |
394 | } | 393 | } |
@@ -428,7 +427,6 @@ static void encode_path(struct xdr_stream *xdr, struct page **pages, u32 length) | |||
428 | { | 427 | { |
429 | __be32 *p; | 428 | __be32 *p; |
430 | 429 | ||
431 | BUG_ON(length > NFS2_MAXPATHLEN); | ||
432 | p = xdr_reserve_space(xdr, 4); | 430 | p = xdr_reserve_space(xdr, 4); |
433 | *p = cpu_to_be32(length); | 431 | *p = cpu_to_be32(length); |
434 | xdr_write_pages(xdr, pages, 0, length); | 432 | xdr_write_pages(xdr, pages, 0, length); |