From feb7988b1aa76ff46dd4d016bdd879c0fc3f7de0 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Fri, 20 Feb 2009 15:32:20 +0000 Subject: [PATCH] Branch HEAD b=18289 Extra patch for HEAD. --- ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch b/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch index 310b645..e2dac7b 100644 --- a/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch +++ b/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch @@ -2,7 +2,7 @@ Index: linux-2.6.18-53.1.14/fs/ext3/namei.c =================================================================== --- linux-2.6.18-53.1.14/fs/ext3/namei.c 2008-12-02 13:21:14.000000000 +0530 +++ linux-2.6.18-53.1.14_new/fs/ext3/namei.c 2008-12-02 15:11:09.000000000 +0530 -@@ -1656,13 +1656,24 @@ static int ext3_delete_entry (handle_t * +@@ -1656,11 +1656,17 @@ static int ext3_delete_entry (handle_t * static inline void ext3_inc_count(handle_t *handle, struct inode *inode) { inode->i_nlink++; @@ -13,21 +13,14 @@ Index: linux-2.6.18-53.1.14/fs/ext3/namei.c + } } --static inline void ext3_dec_count(handle_t *handle, struct inode *inode) -+static inline void drop_nlink(struct inode *inode) + static inline void ext3_dec_count(handle_t *handle, struct inode *inode) { - inode->i_nlink--; - } - -+static inline void ext3_dec_count(handle_t *handle, struct inode *inode) -+{ +- inode->i_nlink--; + if (!S_ISDIR(inode->i_mode) || inode->i_nlink > 2) + drop_nlink(inode); -+} -+ + } + static int ext3_add_nondir(handle_t *handle, - struct dentry *dentry, struct inode *inode) - { @@ -1759,7 +1770,7 @@ static int ext3_mkdir(struct inode * dir struct ext3_dir_entry_2 * de; int err, retries = 0; -- 1.8.3.1