patch-1.3.45 linux/fs/sysv/truncate.c
Next file: linux/fs/xiafs/bitmap.c
Previous file: linux/fs/sysv/inode.c
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Sun Nov 26 19:23:10 1995
- Orig file:
v1.3.44/linux/fs/sysv/truncate.c
- Orig date:
Thu Nov 9 11:23:52 1995
diff -u --recursive --new-file v1.3.44/linux/fs/sysv/truncate.c linux/fs/sysv/truncate.c
@@ -171,13 +171,16 @@
else
i = (inode->i_size - offset + sb->sv_ind_per_block_block_size_1) >> sb->sv_ind_per_block_block_size_bits;
for (; i < sb->sv_ind_per_block; i++) {
+ unsigned char dirty = 0;
ind = ((sysv_zone_t *) indbh->b_data) + i;
block = tmp = *ind;
if (sb->sv_convert)
block = from_coh_ulong(block);
if (!block)
continue;
- retry |= trunc_indirect(inode,offset+(i<<sb->sv_ind_per_block_bits),ind,sb->sv_convert,&indbh->b_dirt);
+ retry |= trunc_indirect(inode,offset+(i<<sb->sv_ind_per_block_bits),ind,sb->sv_convert,&dirty);
+ if (dirty)
+ mark_buffer_dirty(indbh, 1);
}
for (i = 0; i < sb->sv_ind_per_block; i++)
if (((sysv_zone_t *) indbh->b_data)[i])
@@ -225,13 +228,16 @@
else
i = (inode->i_size - offset + sb->sv_ind_per_block_2_block_size_1) >> sb->sv_ind_per_block_2_block_size_bits;
for (; i < sb->sv_ind_per_block; i++) {
+ unsigned char dirty = 0;
ind = ((sysv_zone_t *) indbh->b_data) + i;
block = tmp = *ind;
if (sb->sv_convert)
block = from_coh_ulong(block);
if (!block)
continue;
- retry |= trunc_dindirect(inode,offset+(i<<sb->sv_ind_per_block_2_bits),ind,sb->sv_convert,&indbh->b_dirt);
+ retry |= trunc_dindirect(inode,offset+(i<<sb->sv_ind_per_block_2_bits),ind,sb->sv_convert,&dirty);
+ if (dirty)
+ mark_buffer_dirty(indbh, 1);
}
for (i = 0; i < sb->sv_ind_per_block; i++)
if (((sysv_zone_t *) indbh->b_data)[i])
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this