diff options
author | Theodore Ts'o <tytso@mit.edu> | 2008-03-13 23:13:18 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-03-13 23:13:18 -0400 |
commit | ee19c902e6f09ae058577f6b742d60692e7fb853 (patch) | |
tree | 93b8189c0817d12e964d5839997faf627a95c16a /e2fsck/pass1.c | |
parent | 7cadc57780f3e3e8e644e8976e11a336902d4a25 (diff) | |
download | e2fsprogs-ee19c902e6f09ae058577f6b742d60692e7fb853.tar.gz |
e2fsck: Check for fast symlinks that have EXTENTS_FL set
These shouldn't show up in the wild, but if they do, e2fsck will offer
to clear them.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'e2fsck/pass1.c')
-rw-r--r-- | e2fsck/pass1.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 86389898..50e38e1f 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -713,6 +713,14 @@ void e2fsck_pass1(e2fsck_t ctx) } } + if (extent_fs && (inode->i_flags & EXT4_EXTENTS_FL) && + LINUX_S_ISLNK(inode->i_mode) && + !ext2fs_inode_has_valid_blocks(inode) && + fix_problem(ctx, PR_1_FAST_SYMLINK_EXTENT_FL, &pctx)) { + inode->i_flags &= ~EXT4_EXTENTS_FL; + e2fsck_write_inode(ctx, ino, inode, "pass1"); + } + if (ino == EXT2_BAD_INO) { struct process_block_struct pb; |