[BRIDGE]: Missing rtnl.
[powerpc.git] / fs / jbd / commit.c
index 32a8caf..be4648b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * linux/fs/commit.c
+ * linux/fs/jbd/commit.c
  *
  * Written by Stephen C. Tweedie <sct@redhat.com>, 1998
  *
@@ -248,8 +248,12 @@ write_out_data:
                                bufs = 0;
                                goto write_out_data;
                        }
-               }
-               else {
+               } else if (!locked && buffer_locked(bh)) {
+                       __journal_file_buffer(jh, commit_transaction,
+                                               BJ_Locked);
+                       jbd_unlock_bh_state(bh);
+                       put_bh(bh);
+               } else {
                        BUFFER_TRACE(bh, "writeout complete: unfile");
                        __journal_unfile_buffer(jh);
                        jbd_unlock_bh_state(bh);