aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/reiserfs/namei.c')
-rw-r--r--fs/reiserfs/namei.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
index ddf1bcd41c87..d9c1c8bd2950 100644
--- a/fs/reiserfs/namei.c
+++ b/fs/reiserfs/namei.c
@@ -598,15 +598,13 @@ static int reiserfs_create(struct inode *dir, struct dentry *dentry, int mode,
598 2 * (REISERFS_QUOTA_INIT_BLOCKS(dir->i_sb) + 598 2 * (REISERFS_QUOTA_INIT_BLOCKS(dir->i_sb) +
599 REISERFS_QUOTA_TRANS_BLOCKS(dir->i_sb)); 599 REISERFS_QUOTA_TRANS_BLOCKS(dir->i_sb));
600 struct reiserfs_transaction_handle th; 600 struct reiserfs_transaction_handle th;
601 int locked;
602 601
603 if (!(inode = new_inode(dir->i_sb))) { 602 if (!(inode = new_inode(dir->i_sb))) {
604 return -ENOMEM; 603 return -ENOMEM;
605 } 604 }
606 new_inode_init(inode, dir, mode); 605 new_inode_init(inode, dir, mode);
607 606
608 locked = reiserfs_cache_default_acl(dir); 607 jbegin_count += reiserfs_cache_default_acl(dir);
609
610 reiserfs_write_lock(dir->i_sb); 608 reiserfs_write_lock(dir->i_sb);
611 609
612 retval = journal_begin(&th, dir->i_sb, jbegin_count); 610 retval = journal_begin(&th, dir->i_sb, jbegin_count);
@@ -662,7 +660,6 @@ static int reiserfs_mknod(struct inode *dir, struct dentry *dentry, int mode,
662 JOURNAL_PER_BALANCE_CNT * 3 + 660 JOURNAL_PER_BALANCE_CNT * 3 +
663 2 * (REISERFS_QUOTA_INIT_BLOCKS(dir->i_sb) + 661 2 * (REISERFS_QUOTA_INIT_BLOCKS(dir->i_sb) +
664 REISERFS_QUOTA_TRANS_BLOCKS(dir->i_sb)); 662 REISERFS_QUOTA_TRANS_BLOCKS(dir->i_sb));
665 int locked;
666 663
667 if (!new_valid_dev(rdev)) 664 if (!new_valid_dev(rdev))
668 return -EINVAL; 665 return -EINVAL;
@@ -672,8 +669,7 @@ static int reiserfs_mknod(struct inode *dir, struct dentry *dentry, int mode,
672 } 669 }
673 new_inode_init(inode, dir, mode); 670 new_inode_init(inode, dir, mode);
674 671
675 locked = reiserfs_cache_default_acl(dir); 672 jbegin_count += reiserfs_cache_default_acl(dir);
676
677 reiserfs_write_lock(dir->i_sb); 673 reiserfs_write_lock(dir->i_sb);
678 674
679 retval = journal_begin(&th, dir->i_sb, jbegin_count); 675 retval = journal_begin(&th, dir->i_sb, jbegin_count);
@@ -732,7 +728,6 @@ static int reiserfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
732 JOURNAL_PER_BALANCE_CNT * 3 + 728 JOURNAL_PER_BALANCE_CNT * 3 +
733 2 * (REISERFS_QUOTA_INIT_BLOCKS(dir->i_sb) + 729 2 * (REISERFS_QUOTA_INIT_BLOCKS(dir->i_sb) +
734 REISERFS_QUOTA_TRANS_BLOCKS(dir->i_sb)); 730 REISERFS_QUOTA_TRANS_BLOCKS(dir->i_sb));
735 int locked;
736 731
737#ifdef DISPLACE_NEW_PACKING_LOCALITIES 732#ifdef DISPLACE_NEW_PACKING_LOCALITIES
738 /* set flag that new packing locality created and new blocks for the content * of that directory are not displaced yet */ 733 /* set flag that new packing locality created and new blocks for the content * of that directory are not displaced yet */
@@ -744,8 +739,7 @@ static int reiserfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
744 } 739 }
745 new_inode_init(inode, dir, mode); 740 new_inode_init(inode, dir, mode);
746 741
747 locked = reiserfs_cache_default_acl(dir); 742 jbegin_count += reiserfs_cache_default_acl(dir);
748
749 reiserfs_write_lock(dir->i_sb); 743 reiserfs_write_lock(dir->i_sb);
750 744
751 retval = journal_begin(&th, dir->i_sb, jbegin_count); 745 retval = journal_begin(&th, dir->i_sb, jbegin_count);
@@ -1034,8 +1028,6 @@ static int reiserfs_symlink(struct inode *parent_dir,
1034 memcpy(name, symname, strlen(symname)); 1028 memcpy(name, symname, strlen(symname));
1035 padd_item(name, item_len, strlen(symname)); 1029 padd_item(name, item_len, strlen(symname));
1036 1030
1037 /* We would inherit the default ACL here, but symlinks don't get ACLs */
1038
1039 retval = journal_begin(&th, parent_dir->i_sb, jbegin_count); 1031 retval = journal_begin(&th, parent_dir->i_sb, jbegin_count);
1040 if (retval) { 1032 if (retval) {
1041 drop_new_inode(inode); 1033 drop_new_inode(inode);