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/affs/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/affs/namei.c')
-rw-r--r-- | fs/affs/namei.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/affs/namei.c b/fs/affs/namei.c index e3e9efc1fdd8..780a11dc6318 100644 --- a/fs/affs/namei.c +++ b/fs/affs/namei.c | |||
@@ -277,7 +277,7 @@ affs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata | |||
277 | inode->i_mapping->a_ops = (AFFS_SB(sb)->s_flags & SF_OFS) ? &affs_aops_ofs : &affs_aops; | 277 | inode->i_mapping->a_ops = (AFFS_SB(sb)->s_flags & SF_OFS) ? &affs_aops_ofs : &affs_aops; |
278 | error = affs_add_entry(dir, inode, dentry, ST_FILE); | 278 | error = affs_add_entry(dir, inode, dentry, ST_FILE); |
279 | if (error) { | 279 | if (error) { |
280 | inode->i_nlink = 0; | 280 | clear_nlink(inode); |
281 | iput(inode); | 281 | iput(inode); |
282 | return error; | 282 | return error; |
283 | } | 283 | } |
@@ -305,7 +305,7 @@ affs_mkdir(struct inode *dir, struct dentry *dentry, int mode) | |||
305 | 305 | ||
306 | error = affs_add_entry(dir, inode, dentry, ST_USERDIR); | 306 | error = affs_add_entry(dir, inode, dentry, ST_USERDIR); |
307 | if (error) { | 307 | if (error) { |
308 | inode->i_nlink = 0; | 308 | clear_nlink(inode); |
309 | mark_inode_dirty(inode); | 309 | mark_inode_dirty(inode); |
310 | iput(inode); | 310 | iput(inode); |
311 | return error; | 311 | return error; |
@@ -392,7 +392,7 @@ affs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) | |||
392 | return 0; | 392 | return 0; |
393 | 393 | ||
394 | err: | 394 | err: |
395 | inode->i_nlink = 0; | 395 | clear_nlink(inode); |
396 | mark_inode_dirty(inode); | 396 | mark_inode_dirty(inode); |
397 | iput(inode); | 397 | iput(inode); |
398 | return error; | 398 | return error; |