diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-03-03 09:05:07 -0500 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2010-03-04 18:20:30 -0500 |
commit | 871a293155a24554e153538d36e3a80fa169aefb (patch) | |
tree | 7e38f5a2f9e87f63cbc4bc1077a4bb49dde441b0 /fs/ext2 | |
parent | 907f4554e2521cb28b0009d17167760650a9561c (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/ext2')
-rw-r--r-- | fs/ext2/file.c | 1 | ||||
-rw-r--r-- | fs/ext2/ialloc.c | 2 | ||||
-rw-r--r-- | fs/ext2/inode.c | 4 | ||||
-rw-r--r-- | fs/ext2/namei.c | 16 |
4 files changed, 12 insertions, 11 deletions
diff --git a/fs/ext2/file.c b/fs/ext2/file.c index d11f6e484519..5d198d0697fb 100644 --- a/fs/ext2/file.c +++ b/fs/ext2/file.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/time.h> | 21 | #include <linux/time.h> |
22 | #include <linux/pagemap.h> | 22 | #include <linux/pagemap.h> |
23 | #include <linux/quotaops.h> | ||
23 | #include "ext2.h" | 24 | #include "ext2.h" |
24 | #include "xattr.h" | 25 | #include "xattr.h" |
25 | #include "acl.h" | 26 | #include "acl.h" |
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c index 88b71972c626..ad7d572ee8dc 100644 --- a/fs/ext2/ialloc.c +++ b/fs/ext2/ialloc.c | |||
@@ -586,7 +586,7 @@ got: | |||
586 | goto fail_drop; | 586 | goto fail_drop; |
587 | } | 587 | } |
588 | 588 | ||
589 | vfs_dq_init(inode); | 589 | dquot_initialize(inode); |
590 | err = dquot_alloc_inode(inode); | 590 | err = dquot_alloc_inode(inode); |
591 | if (err) | 591 | if (err) |
592 | goto fail_drop; | 592 | goto fail_drop; |
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index c87840c33e17..45ff49f0a4b5 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c | |||
@@ -59,7 +59,7 @@ static inline int ext2_inode_is_fast_symlink(struct inode *inode) | |||
59 | void ext2_delete_inode (struct inode * inode) | 59 | void ext2_delete_inode (struct inode * inode) |
60 | { | 60 | { |
61 | if (!is_bad_inode(inode)) | 61 | if (!is_bad_inode(inode)) |
62 | vfs_dq_init(inode); | 62 | dquot_initialize(inode); |
63 | truncate_inode_pages(&inode->i_data, 0); | 63 | truncate_inode_pages(&inode->i_data, 0); |
64 | 64 | ||
65 | if (is_bad_inode(inode)) | 65 | if (is_bad_inode(inode)) |
@@ -1461,7 +1461,7 @@ int ext2_setattr(struct dentry *dentry, struct iattr *iattr) | |||
1461 | return error; | 1461 | return error; |
1462 | 1462 | ||
1463 | if (iattr->ia_valid & ATTR_SIZE) | 1463 | if (iattr->ia_valid & ATTR_SIZE) |
1464 | vfs_dq_init(inode); | 1464 | dquot_initialize(inode); |
1465 | if ((iattr->ia_valid & ATTR_UID && iattr->ia_uid != inode->i_uid) || | 1465 | if ((iattr->ia_valid & ATTR_UID && iattr->ia_uid != inode->i_uid) || |
1466 | (iattr->ia_valid & ATTR_GID && iattr->ia_gid != inode->i_gid)) { | 1466 | (iattr->ia_valid & ATTR_GID && iattr->ia_gid != inode->i_gid)) { |
1467 | error = dquot_transfer(inode, iattr); | 1467 | error = dquot_transfer(inode, iattr); |
diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c index 5923df7b22af..71efb0e9a3f2 100644 --- a/fs/ext2/namei.c +++ b/fs/ext2/namei.c | |||
@@ -102,7 +102,7 @@ static int ext2_create (struct inode * dir, struct dentry * dentry, int mode, st | |||
102 | { | 102 | { |
103 | struct inode *inode; | 103 | struct inode *inode; |
104 | 104 | ||
105 | vfs_dq_init(dir); | 105 | dquot_initialize(dir); |
106 | 106 | ||
107 | inode = ext2_new_inode(dir, mode); | 107 | inode = ext2_new_inode(dir, mode); |
108 | if (IS_ERR(inode)) | 108 | if (IS_ERR(inode)) |
@@ -131,7 +131,7 @@ static int ext2_mknod (struct inode * dir, struct dentry *dentry, int mode, dev_ | |||
131 | if (!new_valid_dev(rdev)) | 131 | if (!new_valid_dev(rdev)) |
132 | return -EINVAL; | 132 | return -EINVAL; |
133 | 133 | ||
134 | vfs_dq_init(dir); | 134 | dquot_initialize(dir); |
135 | 135 | ||
136 | inode = ext2_new_inode (dir, mode); | 136 | inode = ext2_new_inode (dir, mode); |
137 | err = PTR_ERR(inode); | 137 | err = PTR_ERR(inode); |
@@ -157,7 +157,7 @@ static int ext2_symlink (struct inode * dir, struct dentry * dentry, | |||
157 | if (l > sb->s_blocksize) | 157 | if (l > sb->s_blocksize) |
158 | goto out; | 158 | goto out; |
159 | 159 | ||
160 | vfs_dq_init(dir); | 160 | dquot_initialize(dir); |
161 | 161 | ||
162 | inode = ext2_new_inode (dir, S_IFLNK | S_IRWXUGO); | 162 | inode = ext2_new_inode (dir, S_IFLNK | S_IRWXUGO); |
163 | err = PTR_ERR(inode); | 163 | err = PTR_ERR(inode); |
@@ -202,7 +202,7 @@ static int ext2_link (struct dentry * old_dentry, struct inode * dir, | |||
202 | if (inode->i_nlink >= EXT2_LINK_MAX) | 202 | if (inode->i_nlink >= EXT2_LINK_MAX) |
203 | return -EMLINK; | 203 | return -EMLINK; |
204 | 204 | ||
205 | vfs_dq_init(dir); | 205 | dquot_initialize(dir); |
206 | 206 | ||
207 | inode->i_ctime = CURRENT_TIME_SEC; | 207 | inode->i_ctime = CURRENT_TIME_SEC; |
208 | inode_inc_link_count(inode); | 208 | inode_inc_link_count(inode); |
@@ -226,7 +226,7 @@ static int ext2_mkdir(struct inode * dir, struct dentry * dentry, int mode) | |||
226 | if (dir->i_nlink >= EXT2_LINK_MAX) | 226 | if (dir->i_nlink >= EXT2_LINK_MAX) |
227 | goto out; | 227 | goto out; |
228 | 228 | ||
229 | vfs_dq_init(dir); | 229 | dquot_initialize(dir); |
230 | 230 | ||
231 | inode_inc_link_count(dir); | 231 | inode_inc_link_count(dir); |
232 | 232 | ||
@@ -274,7 +274,7 @@ static int ext2_unlink(struct inode * dir, struct dentry *dentry) | |||
274 | struct page * page; | 274 | struct page * page; |
275 | int err = -ENOENT; | 275 | int err = -ENOENT; |
276 | 276 | ||
277 | vfs_dq_init(dir); | 277 | dquot_initialize(dir); |
278 | 278 | ||
279 | de = ext2_find_entry (dir, &dentry->d_name, &page); | 279 | de = ext2_find_entry (dir, &dentry->d_name, &page); |
280 | if (!de) | 280 | if (!de) |
@@ -318,8 +318,8 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, | |||
318 | struct ext2_dir_entry_2 * old_de; | 318 | struct ext2_dir_entry_2 * old_de; |
319 | int err = -ENOENT; | 319 | int err = -ENOENT; |
320 | 320 | ||
321 | vfs_dq_init(old_dir); | 321 | dquot_initialize(old_dir); |
322 | vfs_dq_init(new_dir); | 322 | dquot_initialize(new_dir); |
323 | 323 | ||
324 | old_de = ext2_find_entry (old_dir, &old_dentry->d_name, &old_page); | 324 | old_de = ext2_find_entry (old_dir, &old_dentry->d_name, &old_page); |
325 | if (!old_de) | 325 | if (!old_de) |