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 <[email protected]>
This commit is contained in:
Miklos Szeredi 2011-10-28 14:13:28 +02:00 • committed by Christoph Hellwig
commit 6d6b77f163
32 changed files with 55 additions and 58 deletions

View file

@ -415,7 +415,7 @@ static int hfsplus_symlink(struct inode *dir, struct dentry *dentry,
goto out;
out_err:
inode->i_nlink = 0;
clear_nlink(inode);
hfsplus_delete_inode(inode);
iput(inode);
out:
@ -440,7 +440,7 @@ static int hfsplus_mknod(struct inode *dir, struct dentry *dentry,
res = hfsplus_create_cat(inode->i_ino, dir, &dentry->d_name, inode);
if (res) {
inode->i_nlink = 0;
clear_nlink(inode);
hfsplus_delete_inode(inode);
iput(inode);
goto out;