patch-2.4.22 linux-2.4.22/fs/locks.c

Next file: linux-2.4.22/fs/namei.c
Previous file: linux-2.4.22/fs/lockd/svcproc.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/fs/locks.c linux-2.4.22/fs/locks.c
@@ -1937,6 +1937,23 @@
 	return length;
 }
 
+void steal_locks(fl_owner_t from)
+{
+	struct list_head *tmp;
+
+	if (from == current->files)
+		return;
+
+	lock_kernel();
+	list_for_each(tmp, &file_lock_list) {
+		struct file_lock *fl = list_entry(tmp, struct file_lock,
+						  fl_link);
+		if (fl->fl_owner == from)
+			fl->fl_owner = current->files;
+	}
+	unlock_kernel();
+}
+
 #ifdef MSNFS
 /**
  *	lock_may_read - checks that the region is free of locks

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)