summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2011-10-16 20:29:00 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-10-16 20:46:49 -0400
commit0c80c44bd08c60f3cd0ad87f12a71a75cac3bcaa (patch)
tree67a7c88cc9f1ec48d47664d8c06f655acf568ae4 /misc
parent515e555a0c36ae0294d71ba9ba45f7fa576cfd0f (diff)
downloade2fsprogs-0c80c44bd08c60f3cd0ad87f12a71a75cac3bcaa.tar.gz
libext2fs: ext2fs_[set_]file_acl_block needs to check for 64-bit feature flag
The ext2fs_file_acl_block() and ext2fs_set_file_acl_block() needs to only check i_file_acl_high if the 64-bit flag is set. This is needed because otherwise we will run into problems on Hurd systems which actually use that field for h_i_mode_high. This involves an ABI change since we need to pass ext2_filsys to these functions. Fortunately these functions were first included in the 1.42-WIP series, so it's OK for us to change them now. (This is why we have 1.42-WIP releases. :-) Addresses-Sourceforge-Bug: #3379227 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'misc')
-rw-r--r--misc/e2image.c8
-rw-r--r--misc/tune2fs.c11
2 files changed, 10 insertions, 9 deletions
diff --git a/misc/e2image.c b/misc/e2image.c
index 23a4df27..d888e5ae 100644
--- a/misc/e2image.c
+++ b/misc/e2image.c
@@ -1087,12 +1087,12 @@ static void write_raw_image_file(ext2_filsys fs, int fd, int type, int flags)
break;
if (!inode.i_links_count)
continue;
- if (ext2fs_file_acl_block(&inode)) {
+ if (ext2fs_file_acl_block(fs, &inode)) {
ext2fs_mark_block_bitmap2(meta_block_map,
- ext2fs_file_acl_block(&inode));
+ ext2fs_file_acl_block(fs, &inode));
meta_blocks_count++;
}
- if (!ext2fs_inode_has_valid_blocks(&inode))
+ if (!ext2fs_inode_has_valid_blocks2(fs, &inode))
continue;
stashed_ino = ino;
@@ -1100,7 +1100,7 @@ static void write_raw_image_file(ext2_filsys fs, int fd, int type, int flags)
pb.is_dir = LINUX_S_ISDIR(inode.i_mode);
if (LINUX_S_ISDIR(inode.i_mode) ||
(LINUX_S_ISLNK(inode.i_mode) &&
- ext2fs_inode_has_valid_blocks(&inode)) ||
+ ext2fs_inode_has_valid_blocks2(fs, &inode)) ||
ino == fs->super->s_journal_inum) {
retval = ext2fs_block_iterate3(fs, ino,
BLOCK_FLAG_READ_ONLY, block_buf,
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 5c44607b..ccb27a8f 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -1486,14 +1486,15 @@ static int inode_scan_and_fix(ext2_filsys fs, ext2fs_block_bitmap bmap)
* Do we need to fix this ??
*/
- if (ext2fs_file_acl_block(&inode) &&
+ if (ext2fs_file_acl_block(fs, &inode) &&
ext2fs_test_block_bitmap2(bmap,
- ext2fs_file_acl_block(&inode))) {
- blk = translate_block(ext2fs_file_acl_block(&inode));
+ ext2fs_file_acl_block(fs, &inode))) {
+ blk = translate_block(ext2fs_file_acl_block(fs,
+ &inode));
if (!blk)
continue;
- ext2fs_file_acl_block_set(&inode, blk);
+ ext2fs_file_acl_block_set(fs, &inode, blk);
/*
* Write the inode to disk so that inode table
@@ -1504,7 +1505,7 @@ static int inode_scan_and_fix(ext2_filsys fs, ext2fs_block_bitmap bmap)
goto err_out;
}
- if (!ext2fs_inode_has_valid_blocks(&inode))
+ if (!ext2fs_inode_has_valid_blocks2(fs, &inode))
continue;
retval = ext2fs_block_iterate3(fs, ino, 0, block_buf,