diff options
Diffstat (limited to 'fs/udf/namei.c')
-rw-r--r-- | fs/udf/namei.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/udf/namei.c b/fs/udf/namei.c index f1dce848ef96..e8d61b114c1b 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c | |||
@@ -577,8 +577,7 @@ static int udf_create(struct inode *dir, struct dentry *dentry, int mode, | |||
577 | 577 | ||
578 | fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err); | 578 | fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err); |
579 | if (!fi) { | 579 | if (!fi) { |
580 | inode->i_nlink--; | 580 | inode_dec_link_count(inode); |
581 | mark_inode_dirty(inode); | ||
582 | iput(inode); | 581 | iput(inode); |
583 | return err; | 582 | return err; |
584 | } | 583 | } |
@@ -618,8 +617,7 @@ static int udf_mknod(struct inode *dir, struct dentry *dentry, int mode, | |||
618 | init_special_inode(inode, mode, rdev); | 617 | init_special_inode(inode, mode, rdev); |
619 | fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err); | 618 | fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err); |
620 | if (!fi) { | 619 | if (!fi) { |
621 | inode->i_nlink--; | 620 | inode_dec_link_count(inode); |
622 | mark_inode_dirty(inode); | ||
623 | iput(inode); | 621 | iput(inode); |
624 | return err; | 622 | return err; |
625 | } | 623 | } |
@@ -665,8 +663,7 @@ static int udf_mkdir(struct inode *dir, struct dentry *dentry, int mode) | |||
665 | inode->i_fop = &udf_dir_operations; | 663 | inode->i_fop = &udf_dir_operations; |
666 | fi = udf_add_entry(inode, NULL, &fibh, &cfi, &err); | 664 | fi = udf_add_entry(inode, NULL, &fibh, &cfi, &err); |
667 | if (!fi) { | 665 | if (!fi) { |
668 | inode->i_nlink--; | 666 | inode_dec_link_count(inode); |
669 | mark_inode_dirty(inode); | ||
670 | iput(inode); | 667 | iput(inode); |
671 | goto out; | 668 | goto out; |
672 | } | 669 | } |
@@ -683,7 +680,7 @@ static int udf_mkdir(struct inode *dir, struct dentry *dentry, int mode) | |||
683 | 680 | ||
684 | fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err); | 681 | fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err); |
685 | if (!fi) { | 682 | if (!fi) { |
686 | inode->i_nlink = 0; | 683 | clear_nlink(inode); |
687 | mark_inode_dirty(inode); | 684 | mark_inode_dirty(inode); |
688 | iput(inode); | 685 | iput(inode); |
689 | goto out; | 686 | goto out; |