- lockdep-add-i_mutex-ordering-annotations-to-the-sunrpc.patch removed from -mm tree

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

 



The patch titled

     Lockdep: add i_mutex ordering annotations to the sunrpc pipe code

has been removed from the -mm tree.  Its filename is

     lockdep-add-i_mutex-ordering-annotations-to-the-sunrpc.patch

This patch was dropped because lockdep is being redone

------------------------------------------------------
Subject: Lockdep: add i_mutex ordering annotations to the sunrpc pipe code
From: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>


Add i_mutex ordering annotations to the sunrpc rpc_pipe code.  This code
has 3 levels of i_mutex hierarchy in some cases: parent dir, client dir and
file inside client dir; the i_mutex ordering is I_MUTEX_PARENT ->
I_MUTEX_CHILD -> I_MUTEX_NORMAL

This patch applies this ordering annotation to the various functions.  This
is in line with the VFS expected ordering where it is always OK to lock a
child after locking a parent; the sunrpc code is very diligent in doing
this correctly.

Signed-off-by: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
Cc: Trond Myklebust <trond.myklebust@xxxxxxxxxx>
Cc: Neil Brown <neilb@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 net/sunrpc/rpc_pipe.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff -puN net/sunrpc/rpc_pipe.c~lockdep-add-i_mutex-ordering-annotations-to-the-sunrpc net/sunrpc/rpc_pipe.c
--- 25/net/sunrpc/rpc_pipe.c~lockdep-add-i_mutex-ordering-annotations-to-the-sunrpc	Fri Jun  2 14:01:49 2006
+++ 25-akpm/net/sunrpc/rpc_pipe.c	Fri Jun  2 14:01:49 2006
@@ -516,7 +516,7 @@ rpc_depopulate(struct dentry *parent)
 	struct dentry *dentry, *dvec[10];
 	int n = 0;
 
-	mutex_lock(&dir->i_mutex);
+	mutex_lock_nested(&dir->i_mutex, I_MUTEX_CHILD);
 repeat:
 	spin_lock(&dcache_lock);
 	list_for_each_safe(pos, next, &parent->d_subdirs) {
@@ -557,7 +557,7 @@ rpc_populate(struct dentry *parent,
 	struct dentry *dentry;
 	int mode, i;
 
-	mutex_lock_nested(&dir->i_mutex, I_MUTEX_CHILD);
+	mutex_lock(&dir->i_mutex);
 	for (i = start; i < eof; i++) {
 		dentry = d_alloc_name(parent, files[i].name);
 		if (!dentry)
@@ -632,7 +632,7 @@ rpc_lookup_negative(char *path, struct n
 	if ((error = rpc_lookup_parent(path, nd)) != 0)
 		return ERR_PTR(error);
 	dir = nd->dentry->d_inode;
-	mutex_lock(&dir->i_mutex);
+	mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT);
 	dentry = lookup_one_len(nd->last.name, nd->dentry, nd->last.len);
 	if (IS_ERR(dentry))
 		goto out_err;
@@ -694,7 +694,7 @@ rpc_rmdir(char *path)
 	if ((error = rpc_lookup_parent(path, &nd)) != 0)
 		return error;
 	dir = nd.dentry->d_inode;
-	mutex_lock(&dir->i_mutex);
+	mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT);
 	dentry = lookup_one_len(nd.last.name, nd.dentry, nd.last.len);
 	if (IS_ERR(dentry)) {
 		error = PTR_ERR(dentry);
@@ -755,7 +755,7 @@ rpc_unlink(char *path)
 	if ((error = rpc_lookup_parent(path, &nd)) != 0)
 		return error;
 	dir = nd.dentry->d_inode;
-	mutex_lock(&dir->i_mutex);
+	mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT);
 	dentry = lookup_one_len(nd.last.name, nd.dentry, nd.last.len);
 	if (IS_ERR(dentry)) {
 		error = PTR_ERR(dentry);
_

Patches currently in -mm which might be from arjan@xxxxxxxxxxxxxxx are

origin.patch
lock-validator-fix-ns83820c-irq-flags-bug.patch
cpu_relax-smpbootc.patch
cpu_relax-smpbootc-fix.patch
add-export_unused_symbol-and-export_unused_symbol_gpl.patch
add-export_unused_symbol-and-export_unused_symbol_gpl-default.patch
spin-rwlock-init-cleanups.patch
lock-validator-introduce-warn_on_oncecond.patch
emu10k1-mark-midi_spinlock-as-used.patch
epoll-use-unlocked-wqueue-operations.patch
pi-futex-futex-code-cleanups.patch
pi-futex-introduce-debug_check_no_locks_freed.patch
pi-futex-add-plist-implementation.patch
pi-futex-scheduler-support-for-pi.patch
pi-futex-rt-mutex-core.patch
pi-futex-rt-mutex-docs.patch
pi-futex-rt-mutex-debug.patch
pi-futex-rt-mutex-tester.patch
pi-futex-rt-mutex-tester-fix.patch
pi-futex-rt-mutex-futex-api.patch
pi-futex-futex_lock_pi-futex_unlock_pi-support.patch
lock-validator-special-locking-kgdb.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