[PATCH 12/28] Don't expect blocksize to always be 8 when calculating padding
Kevin Coffman
kwc at citi.umich.edu
Mon Mar 31 10:31:54 EDT 2008
Allow blocksizes other than 8 when calculating padding
Signed-off-by: Kevin Coffman <kwc at citi.umich.edu>
---
net/sunrpc/auth_gss/gss_krb5_wrap.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/net/sunrpc/auth_gss/gss_krb5_wrap.c b/net/sunrpc/auth_gss/gss_krb5_wrap.c
index 84117c9..14b35a3 100644
--- a/net/sunrpc/auth_gss/gss_krb5_wrap.c
+++ b/net/sunrpc/auth_gss/gss_krb5_wrap.c
@@ -13,10 +13,7 @@
static inline int
gss_krb5_padding(int blocksize, int length)
{
- /* Most of the code is block-size independent but currently we
- * use only 8: */
- BUG_ON(blocksize != 8);
- return 8 - (length & 7);
+ return blocksize - (length & (blocksize - 1));
}
static inline void
More information about the NFSv4
mailing list