diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2011-10-28 08:13:28 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@serles.lst.de> | 2011-11-02 07:53:43 -0400 |
commit | 6d6b77f163c7eabedbba00ed2abb7d4a570bff76 (patch) | |
tree | 6ce074a7dd5a25fae28ef9de6f59ddee08ea4e61 /fs/ocfs2/namei.c | |
parent | dd2a981f46a0903a8770a784f213d4d40bbb6f19 (diff) |
filesystems: add missing nlink wrappers
Replace direct i_nlink updates with the respective updater function
(inc_nlink, drop_nlink, clear_nlink, inode_dec_link_count).
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/ocfs2/namei.c')
-rw-r--r-- | fs/ocfs2/namei.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 0181f63dd463..ea0ecbdda58c 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c | |||
@@ -1377,7 +1377,7 @@ static int ocfs2_rename(struct inode *old_dir, | |||
1377 | } | 1377 | } |
1378 | 1378 | ||
1379 | if (new_inode) { | 1379 | if (new_inode) { |
1380 | new_inode->i_nlink--; | 1380 | drop_nlink(new_inode); |
1381 | new_inode->i_ctime = CURRENT_TIME; | 1381 | new_inode->i_ctime = CURRENT_TIME; |
1382 | } | 1382 | } |
1383 | old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME; | 1383 | old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME; |
@@ -1385,9 +1385,9 @@ static int ocfs2_rename(struct inode *old_dir, | |||
1385 | if (update_dot_dot) { | 1385 | if (update_dot_dot) { |
1386 | status = ocfs2_update_entry(old_inode, handle, | 1386 | status = ocfs2_update_entry(old_inode, handle, |
1387 | &old_inode_dot_dot_res, new_dir); | 1387 | &old_inode_dot_dot_res, new_dir); |
1388 | old_dir->i_nlink--; | 1388 | drop_nlink(old_dir); |
1389 | if (new_inode) { | 1389 | if (new_inode) { |
1390 | new_inode->i_nlink--; | 1390 | drop_nlink(new_inode); |
1391 | } else { | 1391 | } else { |
1392 | inc_nlink(new_dir); | 1392 | inc_nlink(new_dir); |
1393 | mark_inode_dirty(new_dir); | 1393 | mark_inode_dirty(new_dir); |
@@ -2280,7 +2280,7 @@ int ocfs2_create_inode_in_orphan(struct inode *dir, | |||
2280 | goto leave; | 2280 | goto leave; |
2281 | } | 2281 | } |
2282 | 2282 | ||
2283 | inode->i_nlink = 0; | 2283 | clear_nlink(inode); |
2284 | /* do the real work now. */ | 2284 | /* do the real work now. */ |
2285 | status = __ocfs2_mknod_locked(dir, inode, | 2285 | status = __ocfs2_mknod_locked(dir, inode, |
2286 | 0, &new_di_bh, parent_di_bh, handle, | 2286 | 0, &new_di_bh, parent_di_bh, handle, |