Commit d541f7da authored by Oleg Drokin's avatar Oleg Drokin

Corrected calculation of amount of blocks that file occupies on reiserfs.

parent 68d9807c
...@@ -919,7 +919,7 @@ static void init_inode (struct inode * inode, struct path * path) ...@@ -919,7 +919,7 @@ static void init_inode (struct inode * inode, struct path * path)
inode->i_blocks = sd_v1_blocks(sd); inode->i_blocks = sd_v1_blocks(sd);
inode->i_generation = le32_to_cpu (INODE_PKEY (inode)->k_dir_id); inode->i_generation = le32_to_cpu (INODE_PKEY (inode)->k_dir_id);
blocks = (inode->i_size + 511) >> 9; blocks = (inode->i_size + 511) >> 9;
blocks = _ROUND_UP (blocks, inode->i_blksize >> 9); blocks = _ROUND_UP (blocks, inode->i_sb->s_blocksize >> 9);
if (inode->i_blocks > blocks) { if (inode->i_blocks > blocks) {
// there was a bug in <=3.5.23 when i_blocks could take negative // there was a bug in <=3.5.23 when i_blocks could take negative
// values. Starting from 3.5.17 this value could even be stored in // values. Starting from 3.5.17 this value could even be stored in
......
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