Skip to contentSkip to conversation

NFSD: Cleanup unused comments and codes in summarize_posix_acl

PATCH New Kinglong Mee 2 participants 3 messages Apr 13, 2014 – May 8, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 NFSD: Cleanup unused comments and codes in summarize_posix_acl

---
 fs/nfsd/nfs4acl.c | 7 -------
 1 file changed, 7 deletions(-)
fs/nfsd/nfs4acl.c +0 -0
index 6f3f392..de5d66b 100644
@@ -193,16 +193,9 @@ summarize_posix_acl(struct posix_acl *acl, struct

posix_acl_summary *pas)
{
struct posix_acl_entry *pa, *pe;

- /*
- * 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;
-
FOREACH_ACL_ENTRY(pa, acl, pe) {
switch (pa->e_tag) {
case ACL_USER_OBJ:

Signature · 1 line
1.9.0
#1 lore raw

PATCH 1/1 NFSD: Cleanup unused comments and codes in summarize_posix_acl

---
 fs/nfsd/nfs4acl.c | 7 -------
 1 file changed, 7 deletions(-)
fs/nfsd/nfs4acl.c +0 -0
index 6f3f392..de5d66b 100644
@@ -193,16 +193,9 @@ summarize_posix_acl(struct posix_acl *acl, struct

posix_acl_summary *pas)
{
struct posix_acl_entry *pa, *pe;

- /*
- * 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;
-
FOREACH_ACL_ENTRY(pa, acl, pe) {
switch (pa->e_tag) {
case ACL_USER_OBJ:

Signature · 1 line
1.9.0
#2 lore raw

I'd rather leave the comment there as long as we keep the memset.

I think you're right about the pe initialization, I don't know why that's there....

--b.

Quoted 30 lines · Kinglong Mee
---
 fs/nfsd/nfs4acl.c | 7 -------
 1 file changed, 7 deletions(-)
fs/nfsd/nfs4acl.c +0 -7
index 6f3f392..de5d66b 100644
@@ -193,16 +193,9 @@ summarize_posix_acl(struct posix_acl *acl, struct
 posix_acl_summary *pas)
 {
 	struct posix_acl_entry *pa, *pe;
 
-	/*
-	 * 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;
-
 	FOREACH_ACL_ENTRY(pa, acl, pe) {
 		switch (pa->e_tag) {

case ACL_USER_OBJ:

Signature · 1 line
1.9.0