aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/namei.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2010-03-03 09:05:07 -0500
committerJan Kara <jack@suse.cz>2010-03-04 18:20:30 -0500
commit871a293155a24554e153538d36e3a80fa169aefb (patch)
tree7e38f5a2f9e87f63cbc4bc1077a4bb49dde441b0 /fs/ext4/namei.c
parent907f4554e2521cb28b0009d17167760650a9561c (diff)
dquot: cleanup dquot initialize routine
Get rid of the initialize dquot operation - it is now always called from the filesystem and if a filesystem really needs it's own (which none currently does) it can just call into it's own routine directly. Rename the now static low-level dquot_initialize helper to __dquot_initialize and vfs_dq_init to dquot_initialize to have a consistent namespace. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext4/namei.c')
-rw-r--r--fs/ext4/namei.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 20f55c2e7571..7f3d2d75a0dc 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1766,7 +1766,7 @@ static int ext4_create(struct inode *dir, struct dentry *dentry, int mode,
1766 struct inode *inode; 1766 struct inode *inode;
1767 int err, retries = 0; 1767 int err, retries = 0;
1768 1768
1769 vfs_dq_init(dir); 1769 dquot_initialize(dir);
1770 1770
1771retry: 1771retry:
1772 handle = ext4_journal_start(dir, EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + 1772 handle = ext4_journal_start(dir, EXT4_DATA_TRANS_BLOCKS(dir->i_sb) +
@@ -1802,7 +1802,7 @@ static int ext4_mknod(struct inode *dir, struct dentry *dentry,
1802 if (!new_valid_dev(rdev)) 1802 if (!new_valid_dev(rdev))
1803 return -EINVAL; 1803 return -EINVAL;
1804 1804
1805 vfs_dq_init(dir); 1805 dquot_initialize(dir);
1806 1806
1807retry: 1807retry:
1808 handle = ext4_journal_start(dir, EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + 1808 handle = ext4_journal_start(dir, EXT4_DATA_TRANS_BLOCKS(dir->i_sb) +
@@ -1841,7 +1841,7 @@ static int ext4_mkdir(struct inode *dir, struct dentry *dentry, int mode)
1841 if (EXT4_DIR_LINK_MAX(dir)) 1841 if (EXT4_DIR_LINK_MAX(dir))
1842 return -EMLINK; 1842 return -EMLINK;
1843 1843
1844 vfs_dq_init(dir); 1844 dquot_initialize(dir);
1845 1845
1846retry: 1846retry:
1847 handle = ext4_journal_start(dir, EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + 1847 handle = ext4_journal_start(dir, EXT4_DATA_TRANS_BLOCKS(dir->i_sb) +
@@ -2142,8 +2142,8 @@ static int ext4_rmdir(struct inode *dir, struct dentry *dentry)
2142 2142
2143 /* Initialize quotas before so that eventual writes go in 2143 /* Initialize quotas before so that eventual writes go in
2144 * separate transaction */ 2144 * separate transaction */
2145 vfs_dq_init(dir); 2145 dquot_initialize(dir);
2146 vfs_dq_init(dentry->d_inode); 2146 dquot_initialize(dentry->d_inode);
2147 2147
2148 handle = ext4_journal_start(dir, EXT4_DELETE_TRANS_BLOCKS(dir->i_sb)); 2148 handle = ext4_journal_start(dir, EXT4_DELETE_TRANS_BLOCKS(dir->i_sb));
2149 if (IS_ERR(handle)) 2149 if (IS_ERR(handle))
@@ -2203,8 +2203,8 @@ static int ext4_unlink(struct inode *dir, struct dentry *dentry)
2203 2203
2204 /* Initialize quotas before so that eventual writes go 2204 /* Initialize quotas before so that eventual writes go
2205 * in separate transaction */ 2205 * in separate transaction */
2206 vfs_dq_init(dir); 2206 dquot_initialize(dir);
2207 vfs_dq_init(dentry->d_inode); 2207 dquot_initialize(dentry->d_inode);
2208 2208
2209 handle = ext4_journal_start(dir, EXT4_DELETE_TRANS_BLOCKS(dir->i_sb)); 2209 handle = ext4_journal_start(dir, EXT4_DELETE_TRANS_BLOCKS(dir->i_sb));
2210 if (IS_ERR(handle)) 2210 if (IS_ERR(handle))
@@ -2260,7 +2260,7 @@ static int ext4_symlink(struct inode *dir,
2260 if (l > dir->i_sb->s_blocksize) 2260 if (l > dir->i_sb->s_blocksize)
2261 return -ENAMETOOLONG; 2261 return -ENAMETOOLONG;
2262 2262
2263 vfs_dq_init(dir); 2263 dquot_initialize(dir);
2264 2264
2265retry: 2265retry:
2266 handle = ext4_journal_start(dir, EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + 2266 handle = ext4_journal_start(dir, EXT4_DATA_TRANS_BLOCKS(dir->i_sb) +
@@ -2320,7 +2320,7 @@ static int ext4_link(struct dentry *old_dentry,
2320 if (inode->i_nlink >= EXT4_LINK_MAX) 2320 if (inode->i_nlink >= EXT4_LINK_MAX)
2321 return -EMLINK; 2321 return -EMLINK;
2322 2322
2323 vfs_dq_init(dir); 2323 dquot_initialize(dir);
2324 2324
2325 /* 2325 /*
2326 * Return -ENOENT if we've raced with unlink and i_nlink is 0. Doing 2326 * Return -ENOENT if we've raced with unlink and i_nlink is 0. Doing
@@ -2372,15 +2372,15 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
2372 struct ext4_dir_entry_2 *old_de, *new_de; 2372 struct ext4_dir_entry_2 *old_de, *new_de;
2373 int retval, force_da_alloc = 0; 2373 int retval, force_da_alloc = 0;
2374 2374
2375 vfs_dq_init(old_dir); 2375 dquot_initialize(old_dir);
2376 vfs_dq_init(new_dir); 2376 dquot_initialize(new_dir);
2377 2377
2378 old_bh = new_bh = dir_bh = NULL; 2378 old_bh = new_bh = dir_bh = NULL;
2379 2379
2380 /* Initialize quotas before so that eventual writes go 2380 /* Initialize quotas before so that eventual writes go
2381 * in separate transaction */ 2381 * in separate transaction */
2382 if (new_dentry->d_inode) 2382 if (new_dentry->d_inode)
2383 vfs_dq_init(new_dentry->d_inode); 2383 dquot_initialize(new_dentry->d_inode);
2384 handle = ext4_journal_start(old_dir, 2 * 2384 handle = ext4_journal_start(old_dir, 2 *
2385 EXT4_DATA_TRANS_BLOCKS(old_dir->i_sb) + 2385 EXT4_DATA_TRANS_BLOCKS(old_dir->i_sb) +
2386 EXT4_INDEX_EXTRA_TRANS_BLOCKS + 2); 2386 EXT4_INDEX_EXTRA_TRANS_BLOCKS + 2);