patch-1.3.28 linux/fs/namei.c

Next file: linux/fs/nfs/dir.c
Previous file: linux/fs/msdos/namei.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.27/linux/fs/namei.c linux/fs/namei.c
@@ -122,14 +122,14 @@
  */
 int get_write_access(struct inode * inode)
 {
-	struct task_struct ** p;
+	struct task_struct * p;
 
 	if ((inode->i_count > 1) && S_ISREG(inode->i_mode)) /* shortcut */
-		for (p = &LAST_TASK ; p > &FIRST_TASK ; --p) {
+		for_each_task(p) {
 		        struct vm_area_struct * mpnt;
-			if (!*p)
+			if (!p->mm)
 				continue;
-			for(mpnt = (*p)->mm->mmap; mpnt; mpnt = mpnt->vm_next) {
+			for(mpnt = p->mm->mmap; mpnt; mpnt = mpnt->vm_next) {
 				if (inode != mpnt->vm_inode)
 					continue;
 				if (mpnt->vm_flags & VM_DENYWRITE)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this