diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2014-05-23 23:26:49 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-05-30 17:32:24 -0400 |
commit | 1f53146da9cb2c941a3928320a6824d3b035455f (patch) | |
tree | 46e7a0dc2767f4df6baf37867465e445f748f1dd /fs/nfsd | |
parent | f0db79d54b6c9f612fb2ef4f71ca8340edaf89f1 (diff) |
NFSD: Using type of uint32_t for ex_nflavors instead of int
ex_nflavors can't be negative number, just defined by uint32_t.
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/export.c | 7 | ||||
-rw-r--r-- | fs/nfsd/export.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 263d30e7972e..788405107006 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c | |||
@@ -438,13 +438,14 @@ out_free_all: | |||
438 | 438 | ||
439 | static int secinfo_parse(char **mesg, char *buf, struct svc_export *exp) | 439 | static int secinfo_parse(char **mesg, char *buf, struct svc_export *exp) |
440 | { | 440 | { |
441 | int listsize, err; | ||
442 | struct exp_flavor_info *f; | 441 | struct exp_flavor_info *f; |
442 | u32 listsize; | ||
443 | int err; | ||
443 | 444 | ||
444 | err = get_int(mesg, &listsize); | 445 | err = get_uint(mesg, &listsize); |
445 | if (err) | 446 | if (err) |
446 | return err; | 447 | return err; |
447 | if (listsize < 0 || listsize > MAX_SECINFO_LIST) | 448 | if (listsize > MAX_SECINFO_LIST) |
448 | return -EINVAL; | 449 | return -EINVAL; |
449 | 450 | ||
450 | for (f = exp->ex_flavors; f < exp->ex_flavors + listsize; f++) { | 451 | for (f = exp->ex_flavors; f < exp->ex_flavors + listsize; f++) { |
diff --git a/fs/nfsd/export.h b/fs/nfsd/export.h index c7d4ed05e470..cfeea85c5bed 100644 --- a/fs/nfsd/export.h +++ b/fs/nfsd/export.h | |||
@@ -54,7 +54,7 @@ struct svc_export { | |||
54 | int ex_fsid; | 54 | int ex_fsid; |
55 | unsigned char * ex_uuid; /* 16 byte fsid */ | 55 | unsigned char * ex_uuid; /* 16 byte fsid */ |
56 | struct nfsd4_fs_locations ex_fslocs; | 56 | struct nfsd4_fs_locations ex_fslocs; |
57 | int ex_nflavors; | 57 | uint32_t ex_nflavors; |
58 | struct exp_flavor_info ex_flavors[MAX_SECINFO_LIST]; | 58 | struct exp_flavor_info ex_flavors[MAX_SECINFO_LIST]; |
59 | struct cache_detail *cd; | 59 | struct cache_detail *cd; |
60 | }; | 60 | }; |