]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/jbd2/commit.c
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[mv-sheeva.git] / fs / jbd2 / commit.c
index 70b2ae1ef2810e1a8fea2a557bfa5f5e7a395190..6bd8005e3d34434d95fac5037d79d4042af34678 100644 (file)
@@ -248,8 +248,12 @@ write_out_data:
                                bufs = 0;
                                goto write_out_data;
                        }
-               }
-               else {
+               } else if (!locked && buffer_locked(bh)) {
+                       __jbd2_journal_file_buffer(jh, commit_transaction,
+                                               BJ_Locked);
+                       jbd_unlock_bh_state(bh);
+                       put_bh(bh);
+               } else {
                        BUFFER_TRACE(bh, "writeout complete: unfile");
                        __jbd2_journal_unfile_buffer(jh);
                        jbd_unlock_bh_state(bh);