aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ufs
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/ufs
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/ufs')
-rw-r--r--fs/ufs/file.c1
-rw-r--r--fs/ufs/ialloc.c2
-rw-r--r--fs/ufs/inode.c2
-rw-r--r--fs/ufs/namei.c16
-rw-r--r--fs/ufs/truncate.c2
5 files changed, 12 insertions, 11 deletions
diff --git a/fs/ufs/file.c b/fs/ufs/file.c
index d84762f3028e..a8962cecde5b 100644
--- a/fs/ufs/file.c
+++ b/fs/ufs/file.c
@@ -24,6 +24,7 @@
24 */ 24 */
25 25
26#include <linux/fs.h> 26#include <linux/fs.h>
27#include <linux/quotaops.h>
27 28
28#include "ufs_fs.h" 29#include "ufs_fs.h"
29#include "ufs.h" 30#include "ufs.h"
diff --git a/fs/ufs/ialloc.c b/fs/ufs/ialloc.c
index 67b4bdb056fb..230ecf608026 100644
--- a/fs/ufs/ialloc.c
+++ b/fs/ufs/ialloc.c
@@ -355,7 +355,7 @@ cg_found:
355 355
356 unlock_super (sb); 356 unlock_super (sb);
357 357
358 vfs_dq_init(inode); 358 dquot_initialize(inode);
359 err = dquot_alloc_inode(inode); 359 err = dquot_alloc_inode(inode);
360 if (err) { 360 if (err) {
361 dquot_drop(inode); 361 dquot_drop(inode);
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c
index fff8edab382f..09aef49beedb 100644
--- a/fs/ufs/inode.c
+++ b/fs/ufs/inode.c
@@ -910,7 +910,7 @@ void ufs_delete_inode (struct inode * inode)
910 loff_t old_i_size; 910 loff_t old_i_size;
911 911
912 if (!is_bad_inode(inode)) 912 if (!is_bad_inode(inode))
913 vfs_dq_init(inode); 913 dquot_initialize(inode);
914 914
915 truncate_inode_pages(&inode->i_data, 0); 915 truncate_inode_pages(&inode->i_data, 0);
916 if (is_bad_inode(inode)) 916 if (is_bad_inode(inode))
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c
index c33cb90c516d..118556243e7a 100644
--- a/fs/ufs/namei.c
+++ b/fs/ufs/namei.c
@@ -86,7 +86,7 @@ static int ufs_create (struct inode * dir, struct dentry * dentry, int mode,
86 86
87 UFSD("BEGIN\n"); 87 UFSD("BEGIN\n");
88 88
89 vfs_dq_init(dir); 89 dquot_initialize(dir);
90 90
91 inode = ufs_new_inode(dir, mode); 91 inode = ufs_new_inode(dir, mode);
92 err = PTR_ERR(inode); 92 err = PTR_ERR(inode);
@@ -112,7 +112,7 @@ static int ufs_mknod (struct inode * dir, struct dentry *dentry, int mode, dev_t
112 if (!old_valid_dev(rdev)) 112 if (!old_valid_dev(rdev))
113 return -EINVAL; 113 return -EINVAL;
114 114
115 vfs_dq_init(dir); 115 dquot_initialize(dir);
116 116
117 inode = ufs_new_inode(dir, mode); 117 inode = ufs_new_inode(dir, mode);
118 err = PTR_ERR(inode); 118 err = PTR_ERR(inode);
@@ -138,7 +138,7 @@ static int ufs_symlink (struct inode * dir, struct dentry * dentry,
138 if (l > sb->s_blocksize) 138 if (l > sb->s_blocksize)
139 goto out_notlocked; 139 goto out_notlocked;
140 140
141 vfs_dq_init(dir); 141 dquot_initialize(dir);
142 142
143 lock_kernel(); 143 lock_kernel();
144 inode = ufs_new_inode(dir, S_IFLNK | S_IRWXUGO); 144 inode = ufs_new_inode(dir, S_IFLNK | S_IRWXUGO);
@@ -185,7 +185,7 @@ static int ufs_link (struct dentry * old_dentry, struct inode * dir,
185 return -EMLINK; 185 return -EMLINK;
186 } 186 }
187 187
188 vfs_dq_init(dir); 188 dquot_initialize(dir);
189 189
190 inode->i_ctime = CURRENT_TIME_SEC; 190 inode->i_ctime = CURRENT_TIME_SEC;
191 inode_inc_link_count(inode); 191 inode_inc_link_count(inode);
@@ -204,7 +204,7 @@ static int ufs_mkdir(struct inode * dir, struct dentry * dentry, int mode)
204 if (dir->i_nlink >= UFS_LINK_MAX) 204 if (dir->i_nlink >= UFS_LINK_MAX)
205 goto out; 205 goto out;
206 206
207 vfs_dq_init(dir); 207 dquot_initialize(dir);
208 208
209 lock_kernel(); 209 lock_kernel();
210 inode_inc_link_count(dir); 210 inode_inc_link_count(dir);
@@ -250,7 +250,7 @@ static int ufs_unlink(struct inode *dir, struct dentry *dentry)
250 struct page *page; 250 struct page *page;
251 int err = -ENOENT; 251 int err = -ENOENT;
252 252
253 vfs_dq_init(dir); 253 dquot_initialize(dir);
254 254
255 de = ufs_find_entry(dir, &dentry->d_name, &page); 255 de = ufs_find_entry(dir, &dentry->d_name, &page);
256 if (!de) 256 if (!de)
@@ -296,8 +296,8 @@ static int ufs_rename(struct inode *old_dir, struct dentry *old_dentry,
296 struct ufs_dir_entry *old_de; 296 struct ufs_dir_entry *old_de;
297 int err = -ENOENT; 297 int err = -ENOENT;
298 298
299 vfs_dq_init(old_dir); 299 dquot_initialize(old_dir);
300 vfs_dq_init(new_dir); 300 dquot_initialize(new_dir);
301 301
302 old_de = ufs_find_entry(old_dir, &old_dentry->d_name, &old_page); 302 old_de = ufs_find_entry(old_dir, &old_dentry->d_name, &old_page);
303 if (!old_de) 303 if (!old_de)
diff --git a/fs/ufs/truncate.c b/fs/ufs/truncate.c
index e5ef8a3ec230..d3b6270cb377 100644
--- a/fs/ufs/truncate.c
+++ b/fs/ufs/truncate.c
@@ -528,7 +528,7 @@ static int ufs_setattr(struct dentry *dentry, struct iattr *attr)
528 attr->ia_size != i_size_read(inode)) { 528 attr->ia_size != i_size_read(inode)) {
529 loff_t old_i_size = inode->i_size; 529 loff_t old_i_size = inode->i_size;
530 530
531 vfs_dq_init(inode); 531 dquot_initialize(inode);
532 532
533 error = vmtruncate(inode, attr->ia_size); 533 error = vmtruncate(inode, attr->ia_size);
534 if (error) 534 if (error)