[PATCH 3/8] nfsd4: silence a compiler warning in ACL code
J. Bruce Fields
bfields at fieldses.org
Tue Jun 19 15:28:54 EDT 2007
From: J. Bruce Fields <bfields at citi.umich.edu>
Silence a compiler warning in the ACL code, and add a comment making
clear the initialization serves no other purpose.
Signed-off-by: "J. Bruce Fields" <bfields at citi.umich.edu>
---
fs/nfsd/nfs4acl.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c
index cc3b7ba..4adb5ee 100644
--- a/fs/nfsd/nfs4acl.c
+++ b/fs/nfsd/nfs4acl.c
@@ -183,8 +183,13 @@ static void
summarize_posix_acl(struct posix_acl *acl, struct posix_acl_summary *pas)
{
struct posix_acl_entry *pa, *pe;
- pas->users = 0;
- pas->groups = 0;
+
+ /*
+ * Only pas.users and pas.groups need initialization; previous
+ * posix_acl_valid() calls ensure that the other fields will be
+ * initialized in the following loop. But, just to placate gcc:
+ */
+ memset(pas, 0, sizeof(*pas));
pas->mask = 07;
pe = acl->a_entries + acl->a_count;
--
1.5.2.rc3
More information about the NFSv4
mailing list