1 Index: linux-stage/fs/ext4/namei.c
2 ===================================================================
3 --- linux-stage.orig/fs/ext4/namei.c
4 +++ linux-stage/fs/ext4/namei.c
5 @@ -1609,7 +1709,7 @@ static void ext4_inc_count(handle_t *han
6 * DIR_NLINK feature is set if 1) nlinks > EXT4_LINK_MAX or 2) nlinks == 2,
7 * since this indicates that nlinks count was previously 1.
9 -static void ext4_inc_count(handle_t *handle, struct inode *inode)
10 +void ext4_inc_count(handle_t *handle, struct inode *inode)
13 if (is_dx(inode) && inode->i_nlink > 1) {
14 @@ -1709,17 +1709,18 @@ static void ext4_inc_count(handle_t *han
18 +EXPORT_SYMBOL(ext4_inc_count);
21 * If a directory had nlink == 1, then we should let it be 1. This indicates
22 * directory has >EXT4_LINK_MAX subdirs.
24 -static void ext4_dec_count(handle_t *handle, struct inode *inode)
25 +void ext4_dec_count(handle_t *handle, struct inode *inode)
28 - if (S_ISDIR(inode->i_mode) && inode->i_nlink == 0)
30 + if (!S_ISDIR(inode->i_mode) || inode->i_nlink > 2)
33 +EXPORT_SYMBOL(ext4_dec_count);
36 static int ext4_add_nondir(handle_t *handle,