Merge branch 'maint' into next

Conflicts:
	misc/tune2fs.c
pu
Theodore Ts'o 2013-12-14 20:56:29 -05:00
commit 2b24aadee8
3 changed files with 6 additions and 21 deletions

View File

@ -363,6 +363,8 @@ extern errcode_t ext2fs_punch(ext2_filsys fs, ext2_ino_t ino,
if (start > ~0U)
return 0;
if (end > ~0U)
end = ~0U;
count = ((end - start + 1) < ~0U) ? (end - start + 1) : ~0U;
retval = ext2fs_punch_ind(fs, inode, block_buf,
(blk_t) start, count);

View File

@ -98,19 +98,6 @@ void update_grace_times(struct dquot *q)
}
}
static int release_blocks_proc(ext2_filsys fs, blk64_t *blocknr,
e2_blkcnt_t blockcnt EXT2FS_ATTR((unused)),
blk64_t ref_block EXT2FS_ATTR((unused)),
int ref_offset EXT2FS_ATTR((unused)),
void *private EXT2FS_ATTR((unused)))
{
blk64_t block;
block = *blocknr;
ext2fs_block_alloc_stats2(fs, block, -1);
return 0;
}
static int compute_num_blocks_proc(ext2_filsys fs, blk64_t *blocknr,
e2_blkcnt_t blockcnt EXT2FS_ATTR((unused)),
blk64_t ref_block EXT2FS_ATTR((unused)),
@ -135,9 +122,9 @@ errcode_t quota_inode_truncate(ext2_filsys fs, ext2_ino_t ino)
inode.i_dtime = fs->now ? fs->now : time(0);
if (!ext2fs_inode_has_valid_blocks2(fs, &inode))
return 0;
ext2fs_block_iterate3(fs, ino, BLOCK_FLAG_READ_ONLY, NULL,
release_blocks_proc, NULL);
err = ext2fs_punch(fs, ino, &inode, NULL, 0, ~0ULL);
if (err)
return err;
fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
memset(&inode, 0, sizeof(struct ext2_inode));
} else {

View File

@ -2653,8 +2653,7 @@ retry_open:
int set_csum = 0;
dgrp_t i;
if (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)) {
if (ext2fs_has_group_desc_csum(fs)) {
/*
* Changing the UUID requires rewriting all metadata,
* which can race with a mounted fs. Don't allow that.
@ -2665,12 +2664,9 @@ retry_open:
"unmounted.\n"), stderr);
exit(1);
}
if (check_fsck_needed(fs))
exit(1);
}
if (ext2fs_has_group_desc_csum(fs)) {
/*
* Determine if the block group checksums are
* correct so we know whether or not to set