Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f0c1cd0eaf0b127356c2c09e40305453bc361b0f
Commit:     f0c1cd0eaf0b127356c2c09e40305453bc361b0f
Parent:     02888f41e9d7fa95d1f5b2f76e0f0af6ea8198cc
Author:     Pavel Emelyanov <[EMAIL PROTECTED]>
AuthorDate: Wed Sep 19 16:44:07 2007 +0400
Committer:  J. Bruce Fields <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 18:32:45 2007 -0400

    Use list_first_entry in locks_wake_up_blocks
    
    This routine deletes all the elements from the list
    with the "while (!list_empty())" loop, and we already
    have a list_first_entry() macro to help it look nicer :)
    
    Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]>
---
 fs/locks.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/locks.c b/fs/locks.c
index c7c69d2..282b6c1 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -534,7 +534,9 @@ static void locks_insert_block(struct file_lock *blocker,
 static void locks_wake_up_blocks(struct file_lock *blocker)
 {
        while (!list_empty(&blocker->fl_block)) {
-               struct file_lock *waiter = list_entry(blocker->fl_block.next,
+               struct file_lock *waiter;
+
+               waiter = list_first_entry(&blocker->fl_block,
                                struct file_lock, fl_block);
                __locks_delete_block(waiter);
                if (waiter->fl_lmops && waiter->fl_lmops->fl_notify)
-
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