diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2011-10-28 16:13:28 +0400 |
---|---|---|
committer | Christoph Hellwig <hch@serles.lst.de> | 2011-11-02 15:53:43 +0400 |
commit | 6d6b77f163c7eabedbba00ed2abb7d4a570bff76 (patch) | |
tree | 6ce074a7dd5a25fae28ef9de6f59ddee08ea4e61 /fs/ocfs2 | |
parent | dd2a981f46a0903a8770a784f213d4d40bbb6f19 (diff) | |
download | linux-6d6b77f163c7eabedbba00ed2abb7d4a570bff76.tar.xz |
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')
-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, } if (new_inode) { - new_inode->i_nlink--; + drop_nlink(new_inode); new_inode->i_ctime = CURRENT_TIME; } old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME; @@ -1385,9 +1385,9 @@ static int ocfs2_rename(struct inode *old_dir, if (update_dot_dot) { status = ocfs2_update_entry(old_inode, handle, &old_inode_dot_dot_res, new_dir); - old_dir->i_nlink--; + drop_nlink(old_dir); if (new_inode) { - new_inode->i_nlink--; + drop_nlink(new_inode); } else { inc_nlink(new_dir); mark_inode_dirty(new_dir); @@ -2280,7 +2280,7 @@ int ocfs2_create_inode_in_orphan(struct inode *dir, goto leave; } - inode->i_nlink = 0; + clear_nlink(inode); /* do the real work now. */ status = __ocfs2_mknod_locked(dir, inode, 0, &new_di_bh, parent_di_bh, handle, |