aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/clntxdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/lockd/clntxdr.c')
-rw-r--r--fs/lockd/clntxdr.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/fs/lockd/clntxdr.c b/fs/lockd/clntxdr.c
index 982d2676e1f8..9a55797a1cd4 100644
--- a/fs/lockd/clntxdr.c
+++ b/fs/lockd/clntxdr.c
@@ -60,10 +60,6 @@ static void nlm_compute_offsets(const struct nlm_lock *lock,
60{ 60{
61 const struct file_lock *fl = &lock->fl; 61 const struct file_lock *fl = &lock->fl;
62 62
63 BUG_ON(fl->fl_start > NLM_OFFSET_MAX);
64 BUG_ON(fl->fl_end > NLM_OFFSET_MAX &&
65 fl->fl_end != OFFSET_MAX);
66
67 *l_offset = loff_t_to_s32(fl->fl_start); 63 *l_offset = loff_t_to_s32(fl->fl_start);
68 if (fl->fl_end == OFFSET_MAX) 64 if (fl->fl_end == OFFSET_MAX)
69 *l_len = 0; 65 *l_len = 0;
@@ -119,7 +115,6 @@ static void encode_netobj(struct xdr_stream *xdr,
119{ 115{
120 __be32 *p; 116 __be32 *p;
121 117
122 BUG_ON(length > XDR_MAX_NETOBJ);
123 p = xdr_reserve_space(xdr, 4 + length); 118 p = xdr_reserve_space(xdr, 4 + length);
124 xdr_encode_opaque(p, data, length); 119 xdr_encode_opaque(p, data, length);
125} 120}
@@ -153,7 +148,6 @@ out_overflow:
153static void encode_cookie(struct xdr_stream *xdr, 148static void encode_cookie(struct xdr_stream *xdr,
154 const struct nlm_cookie *cookie) 149 const struct nlm_cookie *cookie)
155{ 150{
156 BUG_ON(cookie->len > NLM_MAXCOOKIELEN);
157 encode_netobj(xdr, (u8 *)&cookie->data, cookie->len); 151 encode_netobj(xdr, (u8 *)&cookie->data, cookie->len);
158} 152}
159 153
@@ -195,7 +189,6 @@ out_overflow:
195 */ 189 */
196static void encode_fh(struct xdr_stream *xdr, const struct nfs_fh *fh) 190static void encode_fh(struct xdr_stream *xdr, const struct nfs_fh *fh)
197{ 191{
198 BUG_ON(fh->size != NFS2_FHSIZE);
199 encode_netobj(xdr, (u8 *)&fh->data, NFS2_FHSIZE); 192 encode_netobj(xdr, (u8 *)&fh->data, NFS2_FHSIZE);
200} 193}
201 194
@@ -330,7 +323,6 @@ static void encode_caller_name(struct xdr_stream *xdr, const char *name)
330 u32 length = strlen(name); 323 u32 length = strlen(name);
331 __be32 *p; 324 __be32 *p;
332 325
333 BUG_ON(length > NLM_MAXSTRLEN);
334 p = xdr_reserve_space(xdr, 4 + length); 326 p = xdr_reserve_space(xdr, 4 + length);
335 xdr_encode_opaque(p, name, length); 327 xdr_encode_opaque(p, name, length);
336} 328}