diff options
-rw-r--r-- | lib/ext2fs/ext2_err.et.in | 3 | ||||
-rw-r--r-- | resize/resize2fs.c | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/ext2fs/ext2_err.et.in b/lib/ext2fs/ext2_err.et.in index ac96964d..c5a9ffcc 100644 --- a/lib/ext2fs/ext2_err.et.in +++ b/lib/ext2fs/ext2_err.et.in @@ -542,4 +542,7 @@ ec EXT2_ET_CORRUPT_JOURNAL_SB, ec EXT2_ET_INODE_CORRUPTED, "Inode is corrupted" +ec EXT2_ET_CANNOT_MOVE_EA_INODE, + "Cannot move extended attribute inode" + end diff --git a/resize/resize2fs.c b/resize/resize2fs.c index 8f6d95e7..a54564f0 100644 --- a/resize/resize2fs.c +++ b/resize/resize2fs.c @@ -2058,6 +2058,15 @@ static errcode_t inode_scan_and_fix(ext2_resize_t rfs) goto remap_blocks; /* Don't need to move inode. */ /* + * Moving an extended attribute inode requires updating all inodes + * that reference it which is a lot more involved. + */ + if (inode->i_flags & EXT4_EA_INODE_FL) { + retval = EXT2_ET_CANNOT_MOVE_EA_INODE; + goto errout; + } + + /* * Find a new inode. Now that extents and directory blocks * are tied to the inode number through the checksum, we must * set up the new inode before we start rewriting blocks. |