diff options
Diffstat (limited to 'fs/ext3/namei.c')
-rw-r--r-- | fs/ext3/namei.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index 235e77b52ea5..14c55adfae83 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c | |||
@@ -1621,7 +1621,7 @@ static inline void ext3_inc_count(handle_t *handle, struct inode *inode) | |||
1621 | 1621 | ||
1622 | static inline void ext3_dec_count(handle_t *handle, struct inode *inode) | 1622 | static inline void ext3_dec_count(handle_t *handle, struct inode *inode) |
1623 | { | 1623 | { |
1624 | inode->i_nlink--; | 1624 | drop_nlink(inode); |
1625 | } | 1625 | } |
1626 | 1626 | ||
1627 | static int ext3_add_nondir(handle_t *handle, | 1627 | static int ext3_add_nondir(handle_t *handle, |
@@ -1743,7 +1743,7 @@ retry: | |||
1743 | inode->i_size = EXT3_I(inode)->i_disksize = inode->i_sb->s_blocksize; | 1743 | inode->i_size = EXT3_I(inode)->i_disksize = inode->i_sb->s_blocksize; |
1744 | dir_block = ext3_bread (handle, inode, 0, 1, &err); | 1744 | dir_block = ext3_bread (handle, inode, 0, 1, &err); |
1745 | if (!dir_block) { | 1745 | if (!dir_block) { |
1746 | inode->i_nlink--; /* is this nlink == 0? */ | 1746 | drop_nlink(inode); /* is this nlink == 0? */ |
1747 | ext3_mark_inode_dirty(handle, inode); | 1747 | ext3_mark_inode_dirty(handle, inode); |
1748 | iput (inode); | 1748 | iput (inode); |
1749 | goto out_stop; | 1749 | goto out_stop; |
@@ -2053,7 +2053,7 @@ static int ext3_rmdir (struct inode * dir, struct dentry *dentry) | |||
2053 | ext3_orphan_add(handle, inode); | 2053 | ext3_orphan_add(handle, inode); |
2054 | inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; | 2054 | inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; |
2055 | ext3_mark_inode_dirty(handle, inode); | 2055 | ext3_mark_inode_dirty(handle, inode); |
2056 | dir->i_nlink--; | 2056 | drop_nlink(dir); |
2057 | ext3_update_dx_flag(dir); | 2057 | ext3_update_dx_flag(dir); |
2058 | ext3_mark_inode_dirty(handle, dir); | 2058 | ext3_mark_inode_dirty(handle, dir); |
2059 | 2059 | ||
@@ -2104,7 +2104,7 @@ static int ext3_unlink(struct inode * dir, struct dentry *dentry) | |||
2104 | dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; | 2104 | dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; |
2105 | ext3_update_dx_flag(dir); | 2105 | ext3_update_dx_flag(dir); |
2106 | ext3_mark_inode_dirty(handle, dir); | 2106 | ext3_mark_inode_dirty(handle, dir); |
2107 | inode->i_nlink--; | 2107 | drop_nlink(inode); |
2108 | if (!inode->i_nlink) | 2108 | if (!inode->i_nlink) |
2109 | ext3_orphan_add(handle, inode); | 2109 | ext3_orphan_add(handle, inode); |
2110 | inode->i_ctime = dir->i_ctime; | 2110 | inode->i_ctime = dir->i_ctime; |
@@ -2326,7 +2326,7 @@ static int ext3_rename (struct inode * old_dir, struct dentry *old_dentry, | |||
2326 | } | 2326 | } |
2327 | 2327 | ||
2328 | if (new_inode) { | 2328 | if (new_inode) { |
2329 | new_inode->i_nlink--; | 2329 | drop_nlink(new_inode); |
2330 | new_inode->i_ctime = CURRENT_TIME_SEC; | 2330 | new_inode->i_ctime = CURRENT_TIME_SEC; |
2331 | } | 2331 | } |
2332 | old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC; | 2332 | old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC; |
@@ -2337,9 +2337,9 @@ static int ext3_rename (struct inode * old_dir, struct dentry *old_dentry, | |||
2337 | PARENT_INO(dir_bh->b_data) = cpu_to_le32(new_dir->i_ino); | 2337 | PARENT_INO(dir_bh->b_data) = cpu_to_le32(new_dir->i_ino); |
2338 | BUFFER_TRACE(dir_bh, "call ext3_journal_dirty_metadata"); | 2338 | BUFFER_TRACE(dir_bh, "call ext3_journal_dirty_metadata"); |
2339 | ext3_journal_dirty_metadata(handle, dir_bh); | 2339 | ext3_journal_dirty_metadata(handle, dir_bh); |
2340 | old_dir->i_nlink--; | 2340 | drop_nlink(old_dir); |
2341 | if (new_inode) { | 2341 | if (new_inode) { |
2342 | new_inode->i_nlink--; | 2342 | drop_nlink(new_inode); |
2343 | } else { | 2343 | } else { |
2344 | new_dir->i_nlink++; | 2344 | new_dir->i_nlink++; |
2345 | ext3_update_dx_flag(new_dir); | 2345 | ext3_update_dx_flag(new_dir); |