aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/reiserfs/file.c')
-rw-r--r--fs/reiserfs/file.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c
index f3473176c83a..be12879bb179 100644
--- a/fs/reiserfs/file.c
+++ b/fs/reiserfs/file.c
@@ -1464,13 +1464,11 @@ static ssize_t reiserfs_file_write(struct file *file, /* the file we are going t
1464 partially overwritten pages, if needed. And lock the pages, 1464 partially overwritten pages, if needed. And lock the pages,
1465 so that nobody else can access these until we are done. 1465 so that nobody else can access these until we are done.
1466 We get number of actual blocks needed as a result. */ 1466 We get number of actual blocks needed as a result. */
1467 blocks_to_allocate = 1467 res = reiserfs_prepare_file_region_for_write(inode, pos,
1468 reiserfs_prepare_file_region_for_write(inode, pos, 1468 num_pages,
1469 num_pages, 1469 write_bytes,
1470 write_bytes, 1470 prepared_pages);
1471 prepared_pages); 1471 if (res < 0) {
1472 if (blocks_to_allocate < 0) {
1473 res = blocks_to_allocate;
1474 reiserfs_release_claimed_blocks(inode->i_sb, 1472 reiserfs_release_claimed_blocks(inode->i_sb,
1475 num_pages << 1473 num_pages <<
1476 (PAGE_CACHE_SHIFT - 1474 (PAGE_CACHE_SHIFT -
@@ -1478,6 +1476,8 @@ static ssize_t reiserfs_file_write(struct file *file, /* the file we are going t
1478 break; 1476 break;
1479 } 1477 }
1480 1478
1479 blocks_to_allocate = res;
1480
1481 /* First we correct our estimate of how many blocks we need */ 1481 /* First we correct our estimate of how many blocks we need */
1482 reiserfs_release_claimed_blocks(inode->i_sb, 1482 reiserfs_release_claimed_blocks(inode->i_sb,
1483 (num_pages << 1483 (num_pages <<