Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cee23c79d08c57bbbb9923703409af3b17518c58
Commit:     cee23c79d08c57bbbb9923703409af3b17518c58
Parent:     6760bdcd03a12d7d082794311ccbaf44bfc23b06
Author:     Denis Cheng <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 17:53:58 2007 +0800
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 08:54:58 2007 +0100

    [GFS2] use an temp variable to reduce a spin_unlock
    
    this is more clear.
    
    Signed-off-by: Denis Cheng <[EMAIL PROTECTED]>
    Signed-off-by: David Teigland <[EMAIL PROTECTED]>
    Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
---
 fs/gfs2/locking/dlm/plock.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/fs/gfs2/locking/dlm/plock.c b/fs/gfs2/locking/dlm/plock.c
index fba1f1d..1f7b038 100644
--- a/fs/gfs2/locking/dlm/plock.c
+++ b/fs/gfs2/locking/dlm/plock.c
@@ -346,15 +346,16 @@ static ssize_t dev_write(struct file *file, const char 
__user *u, size_t count,
 
 static unsigned int dev_poll(struct file *file, poll_table *wait)
 {
+       unsigned int mask = 0;
+
        poll_wait(file, &send_wq, wait);
 
        spin_lock(&ops_lock);
-       if (!list_empty(&send_list)) {
-               spin_unlock(&ops_lock);
-               return POLLIN | POLLRDNORM;
-       }
+       if (!list_empty(&send_list))
+               mask = POLLIN | POLLRDNORM;
        spin_unlock(&ops_lock);
-       return 0;
+
+       return mask;
 }
 
 static const struct file_operations dev_fops = {
-
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