}
if (n == num)
return 0;
-@@ -950,11 +951,13 @@
- }
-
- static int walk_page_buffers( handle_t *handle,
-+ struct inode *inode,
- struct buffer_head *head,
- unsigned from,
- unsigned to,
- int *partial,
- int (*fn)( handle_t *handle,
-+ struct inode *inode,
- struct buffer_head *bh))
- {
- struct buffer_head *bh;
-@@ -972,7 +975,7 @@
- *partial = 1;
- continue;
- }
-- err = (*fn)(handle, bh);
-+ err = (*fn)(handle, inode, bh);
- if (!ret)
- ret = err;
- }
-@@ -1005,7 +1008,7 @@
- * write.
- */
-
--static int do_journal_get_write_access(handle_t *handle,
-+static int do_journal_get_write_access(handle_t *handle, struct inode *inode,
- struct buffer_head *bh)
- {
- return ext3_journal_get_write_access(handle, bh);
@@ -1015,8 +1018,8 @@
unsigned from, unsigned to)
{
lock_kernel();
handle = ext3_journal_start(inode, needed_blocks);
-@@ -1031,7 +1034,7 @@
- goto prepare_write_failed;
-
- if (ext3_should_journal_data(inode)) {
-- ret = walk_page_buffers(handle, page->buffers,
-+ ret = walk_page_buffers(handle, inode, page->buffers,
- from, to, NULL, do_journal_get_write_access);
- if (ret) {
- /*
-@@ -1052,24 +1055,32 @@
- return ret;
- }
-
--static int journal_dirty_sync_data(handle_t *handle, struct buffer_head *bh)
-+static int journal_dirty_sync_data(handle_t *handle, struct inode *inode,
-+ struct buffer_head *bh)
- {
-- return ext3_journal_dirty_data(handle, bh, 0);
-+ int ret = ext3_journal_dirty_data(handle, bh, 0);
-+ if (bh->b_inode != inode)
-+ buffer_insert_inode_data_queue(bh, inode);
-+ return ret;
- }
-
- /*
- * For ext3_writepage(). We also brelse() the buffer to account for
- * the bget() which ext3_writepage() performs.
- */
--static int journal_dirty_async_data(handle_t *handle, struct buffer_head *bh)
-+static int journal_dirty_async_data(handle_t *handle, struct inode *inode,
-+ struct buffer_head *bh)
- {
- int ret = ext3_journal_dirty_data(handle, bh, 1);
-+ if (bh->b_inode != inode)
-+ buffer_insert_inode_data_queue(bh, inode);
- __brelse(bh);
- return ret;
- }
-
- /* For commit_write() in data=journal mode */
--static int commit_write_fn(handle_t *handle, struct buffer_head *bh)
-+static int commit_write_fn(handle_t *handle, struct inode *inode,
-+ struct buffer_head *bh)
- {
- set_bit(BH_Uptodate, &bh->b_state);
- return ext3_journal_dirty_metadata(handle, bh);
-@@ -1104,7 +1115,7 @@
- int partial = 0;
- loff_t pos = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to;
-
-- ret = walk_page_buffers(handle, page->buffers,
-+ ret = walk_page_buffers(handle, inode, page->buffers,
- from, to, &partial, commit_write_fn);
- if (!partial)
- SetPageUptodate(page);
-@@ -1114,7 +1125,7 @@
- EXT3_I(inode)->i_state |= EXT3_STATE_JDATA;
- } else {
- if (ext3_should_order_data(inode)) {
-- ret = walk_page_buffers(handle, page->buffers,
-+ ret = walk_page_buffers(handle, inode, page->buffers,
- from, to, NULL, journal_dirty_sync_data);
- }
- /* Be careful here if generic_commit_write becomes a
-@@ -1196,7 +1207,8 @@
- return generic_block_bmap(mapping,block,ext3_get_block);
- }
-
--static int bget_one(handle_t *handle, struct buffer_head *bh)
-+static int bget_one(handle_t *handle, struct inode *inode,
-+ struct buffer_head *bh)
- {
- atomic_inc(&bh->b_count);
- return 0;
-@@ -1295,7 +1307,7 @@
- create_empty_buffers(page,
- inode->i_dev, inode->i_sb->s_blocksize);
- page_buffers = page->buffers;
-- walk_page_buffers(handle, page_buffers, 0,
-+ walk_page_buffers(handle, inode, page_buffers, 0,
- PAGE_CACHE_SIZE, NULL, bget_one);
- }
-
-@@ -1313,7 +1325,7 @@
-
- /* And attach them to the current transaction */
- if (order_data) {
-- err = walk_page_buffers(handle, page_buffers,
-+ err = walk_page_buffers(handle, inode, page_buffers,
- 0, PAGE_CACHE_SIZE, NULL, journal_dirty_async_data);
- if (!ret)
- ret = err;
-@@ -1581,8 +1593,10 @@
- }
- ext3_mark_inode_dirty(handle, inode);
- ext3_journal_test_restart(handle, inode);
-- BUFFER_TRACE(bh, "get_write_access");
-- ext3_journal_get_write_access(handle, bh);
-+ if (bh) {
-+ BUFFER_TRACE(bh, "retaking write access");
-+ ext3_journal_get_write_access(handle, bh);
-+ }
- }
-
- /*
diff -ru lum-2.4.18-um30/fs/ext3/namei.c uml-2.4.18-12.5/fs/ext3/namei.c
--- lum-2.4.18-um30/fs/ext3/namei.c Fri Nov 9 15:25:04 2001
+++ uml-2.4.18-12.5/fs/ext3/namei.c Thu Sep 19 13:40:11 2002