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/logfs/dir.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/logfs/dir.c')
-rw-r--r-- | fs/logfs/dir.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/logfs/dir.c b/fs/logfs/dir.c index b3ff3d894165..b7d7f67cee5a 100644 --- a/fs/logfs/dir.c +++ b/fs/logfs/dir.c | |||
@@ -197,7 +197,7 @@ static int logfs_remove_inode(struct inode *inode) | |||
197 | { | 197 | { |
198 | int ret; | 198 | int ret; |
199 | 199 | ||
200 | inode->i_nlink--; | 200 | drop_nlink(inode); |
201 | ret = write_inode(inode); | 201 | ret = write_inode(inode); |
202 | LOGFS_BUG_ON(ret, inode->i_sb); | 202 | LOGFS_BUG_ON(ret, inode->i_sb); |
203 | return ret; | 203 | return ret; |
@@ -433,7 +433,7 @@ static int __logfs_create(struct inode *dir, struct dentry *dentry, | |||
433 | 433 | ||
434 | ta = kzalloc(sizeof(*ta), GFP_KERNEL); | 434 | ta = kzalloc(sizeof(*ta), GFP_KERNEL); |
435 | if (!ta) { | 435 | if (!ta) { |
436 | inode->i_nlink--; | 436 | drop_nlink(inode); |
437 | iput(inode); | 437 | iput(inode); |
438 | return -ENOMEM; | 438 | return -ENOMEM; |
439 | } | 439 | } |
@@ -456,7 +456,7 @@ static int __logfs_create(struct inode *dir, struct dentry *dentry, | |||
456 | abort_transaction(inode, ta); | 456 | abort_transaction(inode, ta); |
457 | li->li_flags |= LOGFS_IF_STILLBORN; | 457 | li->li_flags |= LOGFS_IF_STILLBORN; |
458 | /* FIXME: truncate symlink */ | 458 | /* FIXME: truncate symlink */ |
459 | inode->i_nlink--; | 459 | drop_nlink(inode); |
460 | iput(inode); | 460 | iput(inode); |
461 | goto out; | 461 | goto out; |
462 | } | 462 | } |
@@ -563,7 +563,7 @@ static int logfs_link(struct dentry *old_dentry, struct inode *dir, | |||
563 | 563 | ||
564 | inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; | 564 | inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; |
565 | ihold(inode); | 565 | ihold(inode); |
566 | inode->i_nlink++; | 566 | inc_nlink(inode); |
567 | mark_inode_dirty_sync(inode); | 567 | mark_inode_dirty_sync(inode); |
568 | 568 | ||
569 | return __logfs_create(dir, dentry, inode, NULL, 0); | 569 | return __logfs_create(dir, dentry, inode, NULL, 0); |