Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=428e6ce023c5890cfecc8ad10335da3f28dbf893
Commit:     428e6ce023c5890cfecc8ad10335da3f28dbf893
Parent:     644fd4f5de9ca147daeb6dc5f844b44ec3d58b47
Author:     Pavel Emelianov <[EMAIL PROTECTED]>
AuthorDate: Tue May 8 00:29:10 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue May 8 11:15:09 2007 -0700

    Lockdep treats down_write_trylock like regular down_write
    
    This causes constructions like
    
    down_write(&mm1->mmap_sem);
    if (down_write_trylock(&mm2->mmap_sem)) {
           ...
           up_write(&mm2->mmap_sem);
    }
    up_write(&mm1->mmap_sem);
    
    generate a lockdep warning about circular locking dependence.
    
    Call rwsem_acquire() with trylock set to 1.
    
    Cc: Ingo Molnar <[EMAIL PROTECTED]>
    Cc: Arjan van de Ven <[EMAIL PROTECTED]>
    Cc: Peter Zijlstra <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/rwsem.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/rwsem.c b/kernel/rwsem.c
index 291ded5..9a87886 100644
--- a/kernel/rwsem.c
+++ b/kernel/rwsem.c
@@ -60,7 +60,7 @@ int down_write_trylock(struct rw_semaphore *sem)
        int ret = __down_write_trylock(sem);
 
        if (ret == 1)
-               rwsem_acquire(&sem->dep_map, 0, 0, _RET_IP_);
+               rwsem_acquire(&sem->dep_map, 0, 1, _RET_IP_);
        return ret;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to