Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=15c7cee7995a9013f1b2f31a15b70e1d2e8ae501
Commit:     15c7cee7995a9013f1b2f31a15b70e1d2e8ae501
Parent:     b0d5fd307463405fe1f57494fbb37f810715ed6d
Author:     Bob Peterson <[EMAIL PROTECTED]>
AuthorDate: Tue Dec 11 19:29:17 2007 -0600
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 08:14:33 2008 +0000

    [GFS2] Function meta_read optimization
    
    This patch optimizes function gfs2_meta_read.  Basically, gfs2_meta_wait
    was being called regardless of whether a disk read was requested.
    This just pulls that wait into the if that triggers the read.
    
    Signed-off-by: Bob Peterson <[EMAIL PROTECTED]>
    Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
---
 fs/gfs2/meta_io.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c
index 4b1aced..3144d35 100644
--- a/fs/gfs2/meta_io.c
+++ b/fs/gfs2/meta_io.c
@@ -222,13 +222,14 @@ int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int 
flags,
                   struct buffer_head **bhp)
 {
        *bhp = getbuf(gl, blkno, CREATE);
-       if (!buffer_uptodate(*bhp))
+       if (!buffer_uptodate(*bhp)) {
                ll_rw_block(READ_META, 1, bhp);
-       if (flags & DIO_WAIT) {
-               int error = gfs2_meta_wait(gl->gl_sbd, *bhp);
-               if (error) {
-                       brelse(*bhp);
-                       return error;
+               if (flags & DIO_WAIT) {
+                       int error = gfs2_meta_wait(gl->gl_sbd, *bhp);
+                       if (error) {
+                               brelse(*bhp);
+                               return error;
+                       }
                }
        }
 
-
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