Skip to content
Snippets Groups Projects
Commit f0053c7a authored by girish's avatar girish
Browse files

dir_nlink incorectly handles link count on failed mkdir. (Patch by Andreas.)

b=14974
i=kalpak
i=girish
parent 5621b9f7
No related branches found
No related tags found
No related merge requests found
...@@ -43,15 +43,6 @@ Index: linux-2.6.12/fs/ext3/namei.c ...@@ -43,15 +43,6 @@ Index: linux-2.6.12/fs/ext3/namei.c
return -EMLINK; return -EMLINK;
retry: 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: @@ -1758,7 +1764,7 @@ retry:
iput (inode); iput (inode);
goto out_stop; goto out_stop;
......
...@@ -30,15 +30,6 @@ Index: linux-2.6.5-7.283/fs/ext3/namei.c ...@@ -30,15 +30,6 @@ Index: linux-2.6.5-7.283/fs/ext3/namei.c
return -EMLINK; return -EMLINK;
retry: 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: @@ -1784,7 +1790,7 @@ retry:
iput (inode); iput (inode);
goto out_stop; goto out_stop;
......
...@@ -30,15 +30,6 @@ Index: linux-2.6.12/fs/ext3/namei.c ...@@ -30,15 +30,6 @@ Index: linux-2.6.12/fs/ext3/namei.c
return -EMLINK; return -EMLINK;
retry: 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: @@ -1758,7 +1764,7 @@ retry:
iput (inode); iput (inode);
goto out_stop; goto out_stop;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment