Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344863
b: refs/heads/master
c: c6af880
h: refs/heads/master
i:
  344861: 035c24d
  344859: bbd965d
  344855: 6b1d0a4
  344847: 58178d0
  344831: d744009
v: v3
  • Loading branch information
Darrick J. Wong authored and Theodore Ts'o committed Nov 13, 2012
1 parent 5f9da4b commit 0a9a225
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dffe9d8da715bed4d395883add90a2d150d85729
refs/heads/master: c6af8803cd4f56aa62a47448c55030d4905b6783
17 changes: 17 additions & 0 deletions trunk/fs/ext4/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,21 @@ static inline int search_dirblock(struct buffer_head *bh,
return 0;
}

static int is_dx_internal_node(struct inode *dir, ext4_lblk_t block,
struct ext4_dir_entry *de)
{
struct super_block *sb = dir->i_sb;

if (!is_dx(dir))
return 0;
if (block == 0)
return 1;
if (de->inode == 0 &&
ext4_rec_len_from_disk(de->rec_len, sb->s_blocksize) ==
sb->s_blocksize)
return 1;
return 0;
}

/*
* ext4_find_entry()
Expand Down Expand Up @@ -1246,6 +1261,8 @@ static struct buffer_head * ext4_find_entry (struct inode *dir,
goto next;
}
if (!buffer_verified(bh) &&
!is_dx_internal_node(dir, block,
(struct ext4_dir_entry *)bh->b_data) &&
!ext4_dirent_csum_verify(dir,
(struct ext4_dir_entry *)bh->b_data)) {
EXT4_ERROR_INODE(dir, "checksumming directory "
Expand Down

0 comments on commit 0a9a225

Please sign in to comment.