[PATCH] Change ll_rw_block() calls in JBD
authorJan Kara <jack@suse.cz>
Tue, 6 Sep 2005 22:19:12 +0000 (15:19 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 7 Sep 2005 23:57:55 +0000 (16:57 -0700)
We must be sure that the current data in buffer are sent to disk.  Hence we
have to call ll_rw_block() with SWRITE.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/jbd/checkpoint.c
fs/jbd/commit.c
fs/jbd/journal.c
fs/jbd/revoke.c

index 5a97e346bd95a247c12f0edcc5b33d1b065d6419..014a51fd00d776d0ded21d1e3eaf6b7cf22ca1ec 100644 (file)
@@ -204,7 +204,7 @@ __flush_batch(journal_t *journal, struct buffer_head **bhs, int *batch_count)
        int i;
 
        spin_unlock(&journal->j_list_lock);
-       ll_rw_block(WRITE, *batch_count, bhs);
+       ll_rw_block(SWRITE, *batch_count, bhs);
        spin_lock(&journal->j_list_lock);
        for (i = 0; i < *batch_count; i++) {
                struct buffer_head *bh = bhs[i];
index 9d0494dcc571ef8480ab6e087eb300b11aa5d25c..2a3e310f79efa7c3665dd037dd572ca35780677f 100644 (file)
@@ -358,7 +358,7 @@ write_out_data:
                                        jbd_debug(2, "submit %d writes\n",
                                                        bufs);
                                        spin_unlock(&journal->j_list_lock);
-                                       ll_rw_block(WRITE, bufs, wbuf);
+                                       ll_rw_block(SWRITE, bufs, wbuf);
                                        journal_brelse_array(wbuf, bufs);
                                        bufs = 0;
                                        goto write_out_data;
@@ -381,7 +381,7 @@ write_out_data:
 
        if (bufs) {
                spin_unlock(&journal->j_list_lock);
-               ll_rw_block(WRITE, bufs, wbuf);
+               ll_rw_block(SWRITE, bufs, wbuf);
                journal_brelse_array(wbuf, bufs);
                spin_lock(&journal->j_list_lock);
        }
index 334f4cf0823b6229ba684415fc10b9c1b64711bb..7ae2c4fe506bb5bd7b2ac21c6bbf80795741361d 100644 (file)
@@ -957,7 +957,7 @@ void journal_update_superblock(journal_t *journal, int wait)
        if (wait)
                sync_dirty_buffer(bh);
        else
-               ll_rw_block(WRITE, 1, &bh);
+               ll_rw_block(SWRITE, 1, &bh);
 
 out:
        /* If we have just flushed the log (by marking s_start==0), then
index 93b9f45eebda16d7bcac16e1cf94c9dd729f1c1a..a56144183462e20d06ad756a5b6d062c44333838 100644 (file)
@@ -614,7 +614,7 @@ static void flush_descriptor(journal_t *journal,
        set_buffer_jwrite(bh);
        BUFFER_TRACE(bh, "write");
        set_buffer_dirty(bh);
-       ll_rw_block(WRITE, 1, &bh);
+       ll_rw_block(SWRITE, 1, &bh);
 }
 #endif