aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/namei.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2011-10-28 08:13:28 -0400
committerChristoph Hellwig <hch@serles.lst.de>2011-11-02 07:53:43 -0400
commit6d6b77f163c7eabedbba00ed2abb7d4a570bff76 (patch)
tree6ce074a7dd5a25fae28ef9de6f59ddee08ea4e61 /fs/reiserfs/namei.c
parentdd2a981f46a0903a8770a784f213d4d40bbb6f19 (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/reiserfs/namei.c')
-rw-r--r--fs/reiserfs/namei.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
index ef392324bbf1..6ce332821633 100644
--- a/fs/reiserfs/namei.c
+++ b/fs/reiserfs/namei.c
@@ -622,7 +622,7 @@ static int reiserfs_create(struct inode *dir, struct dentry *dentry, int mode,
622 dentry->d_name.len, inode, 1 /*visible */ ); 622 dentry->d_name.len, inode, 1 /*visible */ );
623 if (retval) { 623 if (retval) {
624 int err; 624 int err;
625 inode->i_nlink--; 625 drop_nlink(inode);
626 reiserfs_update_sd(&th, inode); 626 reiserfs_update_sd(&th, inode);
627 err = journal_end(&th, dir->i_sb, jbegin_count); 627 err = journal_end(&th, dir->i_sb, jbegin_count);
628 if (err) 628 if (err)
@@ -702,7 +702,7 @@ static int reiserfs_mknod(struct inode *dir, struct dentry *dentry, int mode,
702 dentry->d_name.len, inode, 1 /*visible */ ); 702 dentry->d_name.len, inode, 1 /*visible */ );
703 if (retval) { 703 if (retval) {
704 int err; 704 int err;
705 inode->i_nlink--; 705 drop_nlink(inode);
706 reiserfs_update_sd(&th, inode); 706 reiserfs_update_sd(&th, inode);
707 err = journal_end(&th, dir->i_sb, jbegin_count); 707 err = journal_end(&th, dir->i_sb, jbegin_count);
708 if (err) 708 if (err)
@@ -787,7 +787,7 @@ static int reiserfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
787 dentry->d_name.len, inode, 1 /*visible */ ); 787 dentry->d_name.len, inode, 1 /*visible */ );
788 if (retval) { 788 if (retval) {
789 int err; 789 int err;
790 inode->i_nlink = 0; 790 clear_nlink(inode);
791 DEC_DIR_INODE_NLINK(dir); 791 DEC_DIR_INODE_NLINK(dir);
792 reiserfs_update_sd(&th, inode); 792 reiserfs_update_sd(&th, inode);
793 err = journal_end(&th, dir->i_sb, jbegin_count); 793 err = journal_end(&th, dir->i_sb, jbegin_count);
@@ -1086,7 +1086,7 @@ static int reiserfs_symlink(struct inode *parent_dir,
1086 dentry->d_name.len, inode, 1 /*visible */ ); 1086 dentry->d_name.len, inode, 1 /*visible */ );
1087 if (retval) { 1087 if (retval) {
1088 int err; 1088 int err;
1089 inode->i_nlink--; 1089 drop_nlink(inode);
1090 reiserfs_update_sd(&th, inode); 1090 reiserfs_update_sd(&th, inode);
1091 err = journal_end(&th, parent_dir->i_sb, jbegin_count); 1091 err = journal_end(&th, parent_dir->i_sb, jbegin_count);
1092 if (err) 1092 if (err)
@@ -1129,7 +1129,7 @@ static int reiserfs_link(struct dentry *old_dentry, struct inode *dir,
1129 1129
1130 retval = journal_begin(&th, dir->i_sb, jbegin_count); 1130 retval = journal_begin(&th, dir->i_sb, jbegin_count);
1131 if (retval) { 1131 if (retval) {
1132 inode->i_nlink--; 1132 drop_nlink(inode);
1133 reiserfs_write_unlock(dir->i_sb); 1133 reiserfs_write_unlock(dir->i_sb);
1134 return retval; 1134 return retval;
1135 } 1135 }
@@ -1144,7 +1144,7 @@ static int reiserfs_link(struct dentry *old_dentry, struct inode *dir,
1144 1144
1145 if (retval) { 1145 if (retval) {
1146 int err; 1146 int err;
1147 inode->i_nlink--; 1147 drop_nlink(inode);
1148 err = journal_end(&th, dir->i_sb, jbegin_count); 1148 err = journal_end(&th, dir->i_sb, jbegin_count);
1149 reiserfs_write_unlock(dir->i_sb); 1149 reiserfs_write_unlock(dir->i_sb);
1150 return err ? err : retval; 1150 return err ? err : retval;