Commit f31667a3 authored by Linus Torvalds's avatar Linus Torvalds

Merge http://gkernel.bkbits.net/fs-2.5

into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
parents c3b7d589 6bcbc73a
......@@ -10,7 +10,6 @@ struct ext2_inode_info {
__u32 i_faddr;
__u8 i_frag_no;
__u8 i_frag_size;
__u16 i_osync;
__u32 i_file_acl;
__u32 i_dir_acl;
__u32 i_dtime;
......
......@@ -393,7 +393,6 @@ struct inode * ext2_new_inode(struct inode * dir, int mode)
ei->i_faddr = 0;
ei->i_frag_no = 0;
ei->i_frag_size = 0;
ei->i_osync = 0;
ei->i_file_acl = 0;
ei->i_dir_acl = 0;
ei->i_dtime = 0;
......
......@@ -405,10 +405,10 @@ static int ext2_alloc_branch(struct inode *inode,
mark_buffer_uptodate(bh, 1);
unlock_buffer(bh);
mark_buffer_dirty_inode(bh, inode);
if (IS_SYNC(inode) || EXT2_I(inode)->i_osync) {
ll_rw_block (WRITE, 1, &bh);
wait_on_buffer (bh);
}
/* We used to sync bh here if IS_SYNC(inode).
* But we now rely upon generic_osync_inode()
* and b_inode_buffers
*/
parent = nr;
}
if (n == num)
......@@ -467,18 +467,10 @@ static inline int ext2_splice_branch(struct inode *inode,
inode->i_ctime = CURRENT_TIME;
/* had we spliced it onto indirect block? */
if (where->bh) {
if (where->bh)
mark_buffer_dirty_inode(where->bh, inode);
if (IS_SYNC(inode) || ei->i_osync) {
ll_rw_block (WRITE, 1, &where->bh);
wait_on_buffer(where->bh);
}
}
if (IS_SYNC(inode) || ei->i_osync)
ext2_sync_inode (inode);
else
mark_inode_dirty(inode);
mark_inode_dirty(inode);
return 0;
changed:
......@@ -833,10 +825,6 @@ void ext2_truncate (struct inode * inode)
(u32*)partial->bh->b_data + addr_per_block,
(chain+n-1) - partial);
mark_buffer_dirty_inode(partial->bh, inode);
if (IS_SYNC(inode)) {
ll_rw_block (WRITE, 1, &partial->bh);
wait_on_buffer (partial->bh);
}
brelse (partial->bh);
partial--;
}
......@@ -868,10 +856,12 @@ void ext2_truncate (struct inode * inode)
;
}
inode->i_mtime = inode->i_ctime = CURRENT_TIME;
if (IS_SYNC(inode))
if (IS_SYNC(inode)) {
fsync_inode_buffers(inode);
ext2_sync_inode (inode);
else
} else {
mark_inode_dirty(inode);
}
}
static struct ext2_inode *ext2_get_inode(struct super_block *sb, ino_t ino,
......@@ -958,7 +948,6 @@ void ext2_read_inode (struct inode * inode)
ei->i_faddr = le32_to_cpu(raw_inode->i_faddr);
ei->i_frag_no = raw_inode->i_frag;
ei->i_frag_size = raw_inode->i_fsize;
ei->i_osync = 0;
ei->i_file_acl = le32_to_cpu(raw_inode->i_file_acl);
ei->i_dir_acl = 0;
if (S_ISREG(inode->i_mode))
......
......@@ -542,6 +542,7 @@ int ext3_new_block (handle_t *handle, struct inode * inode,
int i, j, k, tmp, alloctmp;
int bitmap_nr;
int fatal = 0, err;
int performed_allocation = 0;
struct super_block * sb;
struct ext3_group_desc * gdp;
struct ext3_super_block * es;
......@@ -644,8 +645,7 @@ int ext3_new_block (handle_t *handle, struct inode * inode,
}
/* No space left on the device */
unlock_super (sb);
return 0;
goto out;
search_back:
/*
......@@ -694,6 +694,7 @@ int ext3_new_block (handle_t *handle, struct inode * inode,
J_ASSERT_BH(bh, !ext3_test_bit(j, bh->b_data));
BUFFER_TRACE(bh, "setting bitmap bit");
ext3_set_bit(j, bh->b_data);
performed_allocation = 1;
#ifdef CONFIG_JBD_DEBUG
{
......@@ -815,6 +816,11 @@ int ext3_new_block (handle_t *handle, struct inode * inode,
ext3_std_error(sb, fatal);
}
unlock_super (sb);
/*
* Undo the block allocation
*/
if (!performed_allocation)
DQUOT_FREE_BLOCK(inode, 1);
return 0;
}
......
......@@ -584,8 +584,6 @@ static int ext3_alloc_branch(handle_t *handle, struct inode *inode,
parent = nr;
}
if (IS_SYNC(inode))
handle->h_sync = 1;
}
if (n == num)
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment