Skip to contentSkip to conversation

audit: Rename audit mark variable to amark

PATCH In review Jan Kara 3 participants 3 messages Oct 4, 2018 – Oct 10, 2018 Audit

lore
Share & tools
lore

Jan Kara

author
#0 lore raw

PATCH 1/1 audit: Rename audit mark variable to amark

Variable of audit_tree_mark type was called 'mark' which is confusing as we usually call fsnotify_mark variables this way. Rename it to 'amark' to make it explicit this a actually a different thing.

---
 kernel/audit_tree.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Hello Paul,

here is the patch to rename mark to amark as Richard suggested.

Honza

kernel/audit_tree.c +6 -6
index 9c53f7c37bdf..232b8b18cb5b 100644
@@ -175,14 +175,14 @@ static void audit_tree_destroy_watch(struct fsnotify_mark *mark)
 
 static struct fsnotify_mark *alloc_mark(void)
 {
-	struct audit_tree_mark *mark;
+	struct audit_tree_mark *amark;
 
-	mark = kmem_cache_zalloc(audit_tree_mark_cachep, GFP_KERNEL);
-	if (!mark)
+	amark = kmem_cache_zalloc(audit_tree_mark_cachep, GFP_KERNEL);
+	if (!amark)
 		return NULL;
-	fsnotify_init_mark(&mark->mark, audit_tree_group);
-	mark->mark.mask = FS_IN_IGNORED;
-	return &mark->mark;
+	fsnotify_init_mark(&amark->mark, audit_tree_group);
+	amark->mark.mask = FS_IN_IGNORED;
+	return &amark->mark;
 }
 
 static struct audit_chunk *alloc_chunk(int count)
Signature · 1 line
2.16.4
maintainer
#1 lore raw
Quoted 4 lines · Jan Kara

Variable of audit_tree_mark type was called 'mark' which is confusing as we usually call fsnotify_mark variables this way. Rename it to 'amark' to make it explicit this a actually a different thing.

Quoted 8 lines
---
 kernel/audit_tree.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Hello Paul,

here is the patch to rename mark to amark as Richard suggested.

Thanks, merged into audit/working-fsnotify_fixes.

Quoted 28 lines
kernel/audit_tree.c +6 -7
index 9c53f7c37bdf..232b8b18cb5b 100644
@@ -175,14 +175,14 @@ static void audit_tree_destroy_watch(struct fsnotify_mark *mark)
 
 static struct fsnotify_mark *alloc_mark(void)
 {
-       struct audit_tree_mark *mark;
+       struct audit_tree_mark *amark;
 
-       mark = kmem_cache_zalloc(audit_tree_mark_cachep, GFP_KERNEL);
-       if (!mark)
+       amark = kmem_cache_zalloc(audit_tree_mark_cachep, GFP_KERNEL);
+       if (!amark)
                return NULL;
-       fsnotify_init_mark(&mark->mark, audit_tree_group);
-       mark->mark.mask = FS_IN_IGNORED;
-       return &mark->mark;
+       fsnotify_init_mark(&amark->mark, audit_tree_group);
+       amark->mark.mask = FS_IN_IGNORED;
+       return &amark->mark;
 }
 
 static struct audit_chunk *alloc_chunk(int count)
--

2.16.4

Signature · 2 lines
paul moore
www.paul-moore.com
#2 lore raw
In reply to Jan Kara
Quoted 4 lines · Jan Kara

Variable of audit_tree_mark type was called 'mark' which is confusing as we usually call fsnotify_mark variables this way. Rename it to 'amark' to make it explicit this a actually a different thing.

Better late than never? I've been offline since Thursday. Looks good to me.

Quoted 39 lines
---
 kernel/audit_tree.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Hello Paul,

here is the patch to rename mark to amark as Richard suggested.

Honza

kernel/audit_tree.c +6 -6
index 9c53f7c37bdf..232b8b18cb5b 100644
@@ -175,14 +175,14 @@ static void audit_tree_destroy_watch(struct fsnotify_mark *mark)
 
 static struct fsnotify_mark *alloc_mark(void)
 {
-	struct audit_tree_mark *mark;
+	struct audit_tree_mark *amark;
 
-	mark = kmem_cache_zalloc(audit_tree_mark_cachep, GFP_KERNEL);
-	if (!mark)
+	amark = kmem_cache_zalloc(audit_tree_mark_cachep, GFP_KERNEL);
+	if (!amark)
 		return NULL;
-	fsnotify_init_mark(&mark->mark, audit_tree_group);
-	mark->mark.mask = FS_IN_IGNORED;
-	return &mark->mark;
+	fsnotify_init_mark(&amark->mark, audit_tree_group);
+	amark->mark.mask = FS_IN_IGNORED;
+	return &amark->mark;
 }
 
 static struct audit_chunk *alloc_chunk(int count)
Signature · 1 line
2.16.4

- RGB

--
Richard Guy Briggs <[email protected]>
Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada
IRC: rgb, SunRaycer
Voice: +1.647.777.2635, Internal: (81) 32635