[PATCH] remove unnecessary check in
Prasad P
pvp at us.ibm.com
Wed Oct 24 18:27:02 EDT 2007
The variable error is set to -EINVAL. So, the condition
"error >= IDMAP_NAMESZ" could not be true. So, removing
the unnecessary check.
Cc: Steve French <smfltc at us.ibm.com>
Signed-off-by: Prasad V Potluri <pvp at us.ibm.com>
---
diff -uprN orig/fs/nfsd/nfs4idmap.c new/fs/nfsd/nfs4idmap.c
--- orig/fs/nfsd/nfs4idmap.c 2007-10-24 14:26:51.000000000 -0500
+++ new/fs/nfsd/nfs4idmap.c 2007-10-24 15:23:50.000000000 -0500
@@ -255,13 +255,9 @@ idtoname_parse(struct cache_detail *cd,
goto out;
if (len == 0)
set_bit(CACHE_NEGATIVE, &ent.h.flags);
- else {
- if (error >= IDMAP_NAMESZ) {
- error = -EINVAL;
- goto out;
- }
+ else
memcpy(ent.name, buf1, sizeof(ent.name));
- }
+
error = -ENOMEM;
res = idtoname_update(&ent, res);
if (res == NULL)
Thanks.
Regards,
Prasad Potluri
email: pvp at-sign us dot ibm dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://linux-nfs.org/pipermail/nfsv4/attachments/20071024/fc64a2c3/attachment.htm
More information about the NFSv4
mailing list