- revoke-core-code-rename-to-can_revoke_filevma.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     revoke: rename to can_revoke_{file|vma}
has been removed from the -mm tree.  Its filename was
     revoke-core-code-rename-to-can_revoke_filevma.patch

This patch was dropped because it was folded into revoke-core-code.patch

------------------------------------------------------
Subject: revoke: rename to can_revoke_{file|vma}
From: Pekka Enberg <penberg@xxxxxxxxxxxxxx>

The inode_matches and need_revoke functions have confusing names so rename
them to can_revoke_file and can_revoke_vma respectively.

Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/revoke.c |   33 ++++++++++++++++-----------------
 1 files changed, 16 insertions(+), 17 deletions(-)

diff -puN fs/revoke.c~revoke-core-code-rename-to-can_revoke_filevma fs/revoke.c
--- a/fs/revoke.c~revoke-core-code-rename-to-can_revoke_filevma
+++ a/fs/revoke.c
@@ -75,10 +75,13 @@ static struct file *get_revoked_file(voi
 	return NULL;
 }
 
-static inline int inode_matches(struct file *file, struct inode *inode,
-				struct file *to_exclude)
+static inline bool can_revoke_file(struct file *file, struct inode *inode,
+				   struct file *to_exclude)
 {
-	return file && file != to_exclude && file->f_dentry->d_inode == inode;
+	if (!file || file == to_exclude)
+		return false;
+
+	return file->f_dentry->d_inode == inode;
 }
 
 static inline bool revoke_table_is_full(struct revoke_table *table)
@@ -116,7 +119,7 @@ static int revoke_fds(struct task_struct
 		struct inode *new_inode;
 
 		filp = fcheck_files(files, fd);
-		if (!inode_matches(filp, inode, to_exclude))
+		if (!can_revoke_file(filp, inode, to_exclude))
 			continue;
 
 		if (!filp->f_op->revoke) {
@@ -159,22 +162,18 @@ static int revoke_fds(struct task_struct
 	return err;
 }
 
-static inline bool need_revoke(struct vm_area_struct *vma,
-			       struct inode *inode,
-			       struct file *to_exclude)
+static inline bool can_revoke_vma(struct vm_area_struct *vma,
+				  struct inode *inode, struct file *to_exclude)
 {
 	struct file *file = vma->vm_file;
 
 	if (vma->vm_flags & VM_REVOKED)
 		return false;
 
-	if (!file)
-		return false;
-
-	if (file->f_path.dentry->d_inode != inode)
+	if (!file || file == to_exclude)
 		return false;
 
-	return file != to_exclude;
+	return file->f_path.dentry->d_inode == inode;
 }
 
 static int __revoke_break_cow(struct task_struct *tsk, struct inode *inode,
@@ -191,7 +190,7 @@ static int __revoke_break_cow(struct tas
 		if (vma->vm_flags & VM_SHARED)
 			continue;
 
-		if (!need_revoke(vma, inode, to_exclude))
+		if (!can_revoke_vma(vma, inode, to_exclude))
 			continue;
 
 		ret = get_user_pages(tsk, tsk->mm, vma->vm_start,
@@ -287,7 +286,7 @@ static int revoke_mm(struct mm_struct *m
 		if (!(vma->vm_flags & VM_SHARED))
 			continue;
 
-		if (!need_revoke(vma, mapping->host, to_exclude))
+		if (!can_revoke_vma(vma, mapping->host, to_exclude))
 			continue;
 
 		err = revoke_vma(vma, &details);
@@ -320,7 +319,7 @@ static void revoke_mapping_tree(struct a
 		if (!(vma->vm_flags & VM_SHARED))
 			continue;
 
-		if (likely(!need_revoke(vma, mapping->host, to_exclude)))
+		if (likely(!can_revoke_vma(vma, mapping->host, to_exclude)))
 			continue;
 
 		err = revoke_mm(vma->vm_mm, mapping, to_exclude);
@@ -348,7 +347,7 @@ static void revoke_mapping_list(struct a
 	list_for_each_entry(vma, &mapping->i_mmap_nonlinear, shared.vm_set.list) {
 		int err;
 
-		if (likely(!need_revoke(vma, mapping->host, to_exclude)))
+		if (likely(!can_revoke_vma(vma, mapping->host, to_exclude)))
 			continue;
 
 		err = revoke_mm(vma->vm_mm, mapping, to_exclude);
@@ -470,7 +469,7 @@ static unsigned long inode_fds(struct in
 			struct file *file;
 
 			file = fcheck_files(files, fd);
-			if (inode_matches(file, inode, to_exclude)) {
+			if (can_revoke_file(file, inode, to_exclude)) {
 				nr_fds += fdt->max_fds;
 				break;
 			}
_

Patches currently in -mm which might be from penberg@xxxxxxxxxxxxxx are

origin.patch
krealloc-fix-kerneldoc-comments.patch
slab-use-cpu_lock_.patch
separate-freezer-from-pm-code-rev-2.patch
introduce-freezer-flags-rev-2.patch
unionfs-fix-slab-abuses-with-krealloc.patch
revoke-special-mmap-handling.patch
revoke-special-mmap-handling-vs-fault-vs-invalidate.patch
revoke-core-code.patch
revoke-core-code-rename-to-can_revoke_filevma.patch
revoke-core-code-change-revoke_table-to-fileset-and-revoke_details.patch
revoke-core-code-do_revoke-error-handling.patch
revoke-support-for-ext2-and-ext3.patch
revoke-add-documentation.patch
revoke-wire-up-i386-system-calls.patch
slab-leaks3-default-y.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux