This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / fs / ext3 / inode.c
index 2a45280..b15d640 100644 (file)
@@ -916,17 +916,20 @@ struct buffer_head *ext3_bread(handle_t *handle, struct inode * inode,
                               int block, int create, int *err)
 {
        struct buffer_head * bh;
+       int prev_blocks;
 
-       bh = ext3_getblk(handle, inode, block, create, err);
+       prev_blocks = inode->i_blocks;
+
+       bh = ext3_getblk (handle, inode, block, create, err);
        if (!bh)
                return bh;
        if (buffer_uptodate(bh))
                return bh;
-       ll_rw_block(READ, 1, &bh);
-       wait_on_buffer(bh);
+       ll_rw_block (READ, 1, &bh);
+       wait_on_buffer (bh);
        if (buffer_uptodate(bh))
                return bh;
-       put_bh(bh);
+       brelse (bh);
        *err = -EIO;
        return NULL;
 }
@@ -1494,21 +1497,16 @@ out_stop:
        if (handle) {
                int err;
 
-               if (orphan && inode->i_nlink)
+               if (orphan
                        ext3_orphan_del(handle, inode);
                if (orphan && ret > 0) {
                        loff_t end = offset + ret;
                        if (end > inode->i_size) {
                                ei->i_disksize = end;
                                i_size_write(inode, end);
-                               /*
-                                * We're going to return a positive `ret'
-                                * here due to non-zero-length I/O, so there's
-                                * no way of reporting error returns from
-                                * ext3_mark_inode_dirty() to userspace.  So
-                                * ignore it.
-                                */
-                               ext3_mark_inode_dirty(handle, inode);
+                               err = ext3_mark_inode_dirty(handle, inode);
+                               if (!ret) 
+                                       ret = err;
                        }
                }
                err = ext3_journal_stop(handle);
@@ -2582,7 +2580,7 @@ static int ext3_do_update_inode(handle_t *handle,
                raw_inode->i_uid_high = 0;
                raw_inode->i_gid_high = 0;
        }
-#ifdef CONFIG_INOXID_INTERN
+#ifdef CONFIG_INOXID_GID32
        raw_inode->i_raw_xid = cpu_to_le16(inode->i_xid);
 #endif
        raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);