aboutsummaryrefslogtreecommitdiffstats
path: root/fs/bfs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bfs/dir.c')
-rw-r--r--fs/bfs/dir.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c
index dcf04cb13283..ce05d1643dd1 100644
--- a/fs/bfs/dir.c
+++ b/fs/bfs/dir.c
@@ -117,8 +117,7 @@ static int bfs_create(struct inode * dir, struct dentry * dentry, int mode,
117 117
118 err = bfs_add_entry(dir, dentry->d_name.name, dentry->d_name.len, inode->i_ino); 118 err = bfs_add_entry(dir, dentry->d_name.name, dentry->d_name.len, inode->i_ino);
119 if (err) { 119 if (err) {
120 inode->i_nlink--; 120 inode_dec_link_count(inode);
121 mark_inode_dirty(inode);
122 iput(inode); 121 iput(inode);
123 unlock_kernel(); 122 unlock_kernel();
124 return err; 123 return err;
@@ -196,9 +195,8 @@ static int bfs_unlink(struct inode * dir, struct dentry * dentry)
196 mark_buffer_dirty(bh); 195 mark_buffer_dirty(bh);
197 dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC; 196 dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
198 mark_inode_dirty(dir); 197 mark_inode_dirty(dir);
199 inode->i_nlink--;
200 inode->i_ctime = dir->i_ctime; 198 inode->i_ctime = dir->i_ctime;
201 mark_inode_dirty(inode); 199 inode_dec_link_count(inode);
202 error = 0; 200 error = 0;
203 201
204out_brelse: 202out_brelse:
@@ -249,9 +247,8 @@ static int bfs_rename(struct inode * old_dir, struct dentry * old_dentry,
249 old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC; 247 old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC;
250 mark_inode_dirty(old_dir); 248 mark_inode_dirty(old_dir);
251 if (new_inode) { 249 if (new_inode) {
252 new_inode->i_nlink--;
253 new_inode->i_ctime = CURRENT_TIME_SEC; 250 new_inode->i_ctime = CURRENT_TIME_SEC;
254 mark_inode_dirty(new_inode); 251 inode_dec_link_count(new_inode);
255 } 252 }
256 mark_buffer_dirty(old_bh); 253 mark_buffer_dirty(old_bh);
257 error = 0; 254 error = 0;