From f0053c7a262392615263caafeae39ad247a64f2e Mon Sep 17 00:00:00 2001 From: girish Date: Tue, 4 Mar 2008 07:29:49 +0000 Subject: [PATCH] dir_nlink incorectly handles link count on failed mkdir. (Patch by Andreas.) b=14974 i=kalpak i=girish --- ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.22-vanilla.patch | 9 --------- ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.7.patch | 9 --------- ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch | 9 --------- 3 files changed, 27 deletions(-) diff --git a/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.22-vanilla.patch b/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.22-vanilla.patch index 761c72c..0f775ee 100644 --- a/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.22-vanilla.patch +++ b/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.22-vanilla.patch @@ -43,15 +43,6 @@ Index: linux-2.6.12/fs/ext3/namei.c return -EMLINK; retry: -@@ -1726,7 +1732,7 @@ retry: - inode->i_size = EXT3_I(inode)->i_disksize = inode->i_sb->s_blocksize; - dir_block = ext3_bread (handle, inode, 0, 1, &err); - if (!dir_block) { -- drop_nlink(inode); /* is this nlink == 0? */ -+ ext3_dec_count(handle, inode); /* is this nlink == 0? */ - ext3_mark_inode_dirty(handle, inode); - iput (inode); - goto out_stop; @@ -1758,7 +1764,7 @@ retry: iput (inode); goto out_stop; diff --git a/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.7.patch b/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.7.patch index 5054b0c..86b5144 100644 --- a/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.7.patch +++ b/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.7.patch @@ -30,15 +30,6 @@ Index: linux-2.6.5-7.283/fs/ext3/namei.c return -EMLINK; retry: -@@ -1752,7 +1758,7 @@ retry: - inode->i_size = EXT3_I(inode)->i_disksize = inode->i_sb->s_blocksize; - dir_block = ext3_bread (handle, inode, 0, 1, &err); - if (!dir_block) { -- inode->i_nlink--; /* is this nlink == 0? */ -+ ext3_dec_count(handle, inode); /* is this nlink == 0? */ - ext3_mark_inode_dirty(handle, inode); - iput (inode); - goto out_stop; @@ -1784,7 +1790,7 @@ retry: iput (inode); goto out_stop; 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 d572c8f..fb32a64 100644 --- a/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch +++ b/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch @@ -30,15 +30,6 @@ Index: linux-2.6.12/fs/ext3/namei.c return -EMLINK; retry: -@@ -1726,7 +1732,7 @@ retry: - inode->i_size = EXT3_I(inode)->i_disksize = inode->i_sb->s_blocksize; - dir_block = ext3_bread (handle, inode, 0, 1, &err); - if (!dir_block) { -- inode->i_nlink--; /* is this nlink == 0? */ -+ ext3_dec_count(handle, inode); /* is this nlink == 0? */ - ext3_mark_inode_dirty(handle, inode); - iput (inode); - goto out_stop; @@ -1758,7 +1764,7 @@ retry: iput (inode); goto out_stop; -- 1.8.3.1