diff options
Diffstat (limited to 'fs/lockd/clnt4xdr.c')
-rw-r--r-- | fs/lockd/clnt4xdr.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/fs/lockd/clnt4xdr.c b/fs/lockd/clnt4xdr.c index 13ad1539fbf2..00ec0b9c94d1 100644 --- a/fs/lockd/clnt4xdr.c +++ b/fs/lockd/clnt4xdr.c | |||
@@ -64,10 +64,6 @@ static void nlm4_compute_offsets(const struct nlm_lock *lock, | |||
64 | { | 64 | { |
65 | const struct file_lock *fl = &lock->fl; | 65 | const struct file_lock *fl = &lock->fl; |
66 | 66 | ||
67 | BUG_ON(fl->fl_start > NLM4_OFFSET_MAX); | ||
68 | BUG_ON(fl->fl_end > NLM4_OFFSET_MAX && | ||
69 | fl->fl_end != OFFSET_MAX); | ||
70 | |||
71 | *l_offset = loff_t_to_s64(fl->fl_start); | 67 | *l_offset = loff_t_to_s64(fl->fl_start); |
72 | if (fl->fl_end == OFFSET_MAX) | 68 | if (fl->fl_end == OFFSET_MAX) |
73 | *l_len = 0; | 69 | *l_len = 0; |
@@ -122,7 +118,6 @@ static void encode_netobj(struct xdr_stream *xdr, | |||
122 | { | 118 | { |
123 | __be32 *p; | 119 | __be32 *p; |
124 | 120 | ||
125 | BUG_ON(length > XDR_MAX_NETOBJ); | ||
126 | p = xdr_reserve_space(xdr, 4 + length); | 121 | p = xdr_reserve_space(xdr, 4 + length); |
127 | xdr_encode_opaque(p, data, length); | 122 | xdr_encode_opaque(p, data, length); |
128 | } | 123 | } |
@@ -156,7 +151,6 @@ out_overflow: | |||
156 | static void encode_cookie(struct xdr_stream *xdr, | 151 | static void encode_cookie(struct xdr_stream *xdr, |
157 | const struct nlm_cookie *cookie) | 152 | const struct nlm_cookie *cookie) |
158 | { | 153 | { |
159 | BUG_ON(cookie->len > NLM_MAXCOOKIELEN); | ||
160 | encode_netobj(xdr, (u8 *)&cookie->data, cookie->len); | 154 | encode_netobj(xdr, (u8 *)&cookie->data, cookie->len); |
161 | } | 155 | } |
162 | 156 | ||
@@ -198,7 +192,6 @@ out_overflow: | |||
198 | */ | 192 | */ |
199 | static void encode_fh(struct xdr_stream *xdr, const struct nfs_fh *fh) | 193 | static void encode_fh(struct xdr_stream *xdr, const struct nfs_fh *fh) |
200 | { | 194 | { |
201 | BUG_ON(fh->size > NFS3_FHSIZE); | ||
202 | encode_netobj(xdr, (u8 *)&fh->data, fh->size); | 195 | encode_netobj(xdr, (u8 *)&fh->data, fh->size); |
203 | } | 196 | } |
204 | 197 | ||
@@ -336,7 +329,6 @@ static void encode_caller_name(struct xdr_stream *xdr, const char *name) | |||
336 | u32 length = strlen(name); | 329 | u32 length = strlen(name); |
337 | __be32 *p; | 330 | __be32 *p; |
338 | 331 | ||
339 | BUG_ON(length > NLM_MAXSTRLEN); | ||
340 | p = xdr_reserve_space(xdr, 4 + length); | 332 | p = xdr_reserve_space(xdr, 4 + length); |
341 | xdr_encode_opaque(p, name, length); | 333 | xdr_encode_opaque(p, name, length); |
342 | } | 334 | } |