diff options
Diffstat (limited to 'fs/ext3/namei.c')
-rw-r--r-- | fs/ext3/namei.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index 7b0e44f7d66f..a492b371b134 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c | |||
@@ -1696,6 +1696,8 @@ static int ext3_create (struct inode * dir, struct dentry * dentry, int mode, | |||
1696 | struct inode * inode; | 1696 | struct inode * inode; |
1697 | int err, retries = 0; | 1697 | int err, retries = 0; |
1698 | 1698 | ||
1699 | vfs_dq_init(dir); | ||
1700 | |||
1699 | retry: | 1701 | retry: |
1700 | handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS(dir->i_sb) + | 1702 | handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS(dir->i_sb) + |
1701 | EXT3_INDEX_EXTRA_TRANS_BLOCKS + 3 + | 1703 | EXT3_INDEX_EXTRA_TRANS_BLOCKS + 3 + |
@@ -1730,6 +1732,8 @@ static int ext3_mknod (struct inode * dir, struct dentry *dentry, | |||
1730 | if (!new_valid_dev(rdev)) | 1732 | if (!new_valid_dev(rdev)) |
1731 | return -EINVAL; | 1733 | return -EINVAL; |
1732 | 1734 | ||
1735 | vfs_dq_init(dir); | ||
1736 | |||
1733 | retry: | 1737 | retry: |
1734 | handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS(dir->i_sb) + | 1738 | handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS(dir->i_sb) + |
1735 | EXT3_INDEX_EXTRA_TRANS_BLOCKS + 3 + | 1739 | EXT3_INDEX_EXTRA_TRANS_BLOCKS + 3 + |
@@ -1766,6 +1770,8 @@ static int ext3_mkdir(struct inode * dir, struct dentry * dentry, int mode) | |||
1766 | if (dir->i_nlink >= EXT3_LINK_MAX) | 1770 | if (dir->i_nlink >= EXT3_LINK_MAX) |
1767 | return -EMLINK; | 1771 | return -EMLINK; |
1768 | 1772 | ||
1773 | vfs_dq_init(dir); | ||
1774 | |||
1769 | retry: | 1775 | retry: |
1770 | handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS(dir->i_sb) + | 1776 | handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS(dir->i_sb) + |
1771 | EXT3_INDEX_EXTRA_TRANS_BLOCKS + 3 + | 1777 | EXT3_INDEX_EXTRA_TRANS_BLOCKS + 3 + |
@@ -2060,7 +2066,9 @@ static int ext3_rmdir (struct inode * dir, struct dentry *dentry) | |||
2060 | 2066 | ||
2061 | /* Initialize quotas before so that eventual writes go in | 2067 | /* Initialize quotas before so that eventual writes go in |
2062 | * separate transaction */ | 2068 | * separate transaction */ |
2069 | vfs_dq_init(dir); | ||
2063 | vfs_dq_init(dentry->d_inode); | 2070 | vfs_dq_init(dentry->d_inode); |
2071 | |||
2064 | handle = ext3_journal_start(dir, EXT3_DELETE_TRANS_BLOCKS(dir->i_sb)); | 2072 | handle = ext3_journal_start(dir, EXT3_DELETE_TRANS_BLOCKS(dir->i_sb)); |
2065 | if (IS_ERR(handle)) | 2073 | if (IS_ERR(handle)) |
2066 | return PTR_ERR(handle); | 2074 | return PTR_ERR(handle); |
@@ -2119,7 +2127,9 @@ static int ext3_unlink(struct inode * dir, struct dentry *dentry) | |||
2119 | 2127 | ||
2120 | /* Initialize quotas before so that eventual writes go | 2128 | /* Initialize quotas before so that eventual writes go |
2121 | * in separate transaction */ | 2129 | * in separate transaction */ |
2130 | vfs_dq_init(dir); | ||
2122 | vfs_dq_init(dentry->d_inode); | 2131 | vfs_dq_init(dentry->d_inode); |
2132 | |||
2123 | handle = ext3_journal_start(dir, EXT3_DELETE_TRANS_BLOCKS(dir->i_sb)); | 2133 | handle = ext3_journal_start(dir, EXT3_DELETE_TRANS_BLOCKS(dir->i_sb)); |
2124 | if (IS_ERR(handle)) | 2134 | if (IS_ERR(handle)) |
2125 | return PTR_ERR(handle); | 2135 | return PTR_ERR(handle); |
@@ -2174,6 +2184,8 @@ static int ext3_symlink (struct inode * dir, | |||
2174 | if (l > dir->i_sb->s_blocksize) | 2184 | if (l > dir->i_sb->s_blocksize) |
2175 | return -ENAMETOOLONG; | 2185 | return -ENAMETOOLONG; |
2176 | 2186 | ||
2187 | vfs_dq_init(dir); | ||
2188 | |||
2177 | retry: | 2189 | retry: |
2178 | handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS(dir->i_sb) + | 2190 | handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS(dir->i_sb) + |
2179 | EXT3_INDEX_EXTRA_TRANS_BLOCKS + 5 + | 2191 | EXT3_INDEX_EXTRA_TRANS_BLOCKS + 5 + |
@@ -2228,6 +2240,9 @@ static int ext3_link (struct dentry * old_dentry, | |||
2228 | 2240 | ||
2229 | if (inode->i_nlink >= EXT3_LINK_MAX) | 2241 | if (inode->i_nlink >= EXT3_LINK_MAX) |
2230 | return -EMLINK; | 2242 | return -EMLINK; |
2243 | |||
2244 | vfs_dq_init(dir); | ||
2245 | |||
2231 | /* | 2246 | /* |
2232 | * Return -ENOENT if we've raced with unlink and i_nlink is 0. Doing | 2247 | * Return -ENOENT if we've raced with unlink and i_nlink is 0. Doing |
2233 | * otherwise has the potential to corrupt the orphan inode list. | 2248 | * otherwise has the potential to corrupt the orphan inode list. |
@@ -2278,6 +2293,9 @@ static int ext3_rename (struct inode * old_dir, struct dentry *old_dentry, | |||
2278 | struct ext3_dir_entry_2 * old_de, * new_de; | 2293 | struct ext3_dir_entry_2 * old_de, * new_de; |
2279 | int retval, flush_file = 0; | 2294 | int retval, flush_file = 0; |
2280 | 2295 | ||
2296 | vfs_dq_init(old_dir); | ||
2297 | vfs_dq_init(new_dir); | ||
2298 | |||
2281 | old_bh = new_bh = dir_bh = NULL; | 2299 | old_bh = new_bh = dir_bh = NULL; |
2282 | 2300 | ||
2283 | /* Initialize quotas before so that eventual writes go | 2301 | /* Initialize quotas before so that eventual writes go |