]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ext3/inode.c
ext3: don't read inode block if the buffer has a write error
[linux-2.6-omap-h63xx.git] / fs / ext3 / inode.c
index 74b432fa166b01ae8ebe747bd24679ca8cbe3b3b..36f74f17a11c99760858c1f3b62cd12154fafdac 100644 (file)
@@ -2521,6 +2521,16 @@ static int __ext3_get_inode_loc(struct inode *inode,
        }
        if (!buffer_uptodate(bh)) {
                lock_buffer(bh);
+
+               /*
+                * If the buffer has the write error flag, we have failed
+                * to write out another inode in the same block.  In this
+                * case, we don't have to read the block because we may
+                * read the old inode data successfully.
+                */
+               if (buffer_write_io_error(bh) && !buffer_uptodate(bh))
+                       set_buffer_uptodate(bh);
+
                if (buffer_uptodate(bh)) {
                        /* someone brought it uptodate while we waited */
                        unlock_buffer(bh);