summaryrefslogtreecommitdiff
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-05 00:20:30 +0100
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 d84762f3028..a8962cecde5 100644
--- a/fs/ufs/file.c
+++ b/fs/ufs/file.c
@@ -24,6 +24,7 @@
*/
#include <linux/fs.h>
+#include <linux/quotaops.h>
#include "ufs_fs.h"
#include "ufs.h"
diff --git a/fs/ufs/ialloc.c b/fs/ufs/ialloc.c
index 67b4bdb056f..230ecf60802 100644
--- a/fs/ufs/ialloc.c
+++ b/fs/ufs/ialloc.c
@@ -355,7 +355,7 @@ cg_found:
unlock_super (sb);
- vfs_dq_init(inode);
+ dquot_initialize(inode);
err = dquot_alloc_inode(inode);
if (err) {
dquot_drop(inode);
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c
index fff8edab382..09aef49beed 100644
--- a/fs/ufs/inode.c
+++ b/fs/ufs/inode.c
@@ -910,7 +910,7 @@ void ufs_delete_inode (struct inode * inode)
loff_t old_i_size;
if (!is_bad_inode(inode))
- vfs_dq_init(inode);
+ dquot_initialize(inode);
truncate_inode_pages(&inode->i_data, 0);
if (is_bad_inode(inode))
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c
index c33cb90c516..118556243e7 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,
UFSD("BEGIN\n");
- vfs_dq_init(dir);
+ dquot_initialize(dir);
inode = ufs_new_inode(dir, mode);
err = PTR_ERR(inode);
@@ -112,7 +112,7 @@ static int ufs_mknod (struct inode * dir, struct dentry *dentry, int mode, dev_t
if (!old_valid_dev(rdev))
return -EINVAL;
- vfs_dq_init(dir);
+ dquot_initialize(dir);
inode = ufs_new_inode(dir, mode);
err = PTR_ERR(inode);
@@ -138,7 +138,7 @@ static int ufs_symlink (struct inode * dir, struct dentry * dentry,
if (l > sb->s_blocksize)
goto out_notlocked;
- vfs_dq_init(dir);
+ dquot_initialize(dir);
lock_kernel();
inode = ufs_new_inode(dir, S_IFLNK | S_IRWXUGO);
@@ -185,7 +185,7 @@ static int ufs_link (struct dentry * old_dentry, struct inode * dir,
return -EMLINK;
}
- vfs_dq_init(dir);
+ dquot_initialize(dir);
inode->i_ctime = CURRENT_TIME_SEC;
inode_inc_link_count(inode);
@@ -204,7 +204,7 @@ static int ufs_mkdir(struct inode * dir, struct dentry * dentry, int mode)
if (dir->i_nlink >= UFS_LINK_MAX)
goto out;
- vfs_dq_init(dir);
+ dquot_initialize(dir);
lock_kernel();
inode_inc_link_count(dir);
@@ -250,7 +250,7 @@ static int ufs_unlink(struct inode *dir, struct dentry *dentry)
struct page *page;
int err = -ENOENT;
- vfs_dq_init(dir);
+ dquot_initialize(dir);
de = ufs_find_entry(dir, &dentry->d_name, &page);
if (!de)
@@ -296,8 +296,8 @@ static int ufs_rename(struct inode *old_dir, struct dentry *old_dentry,
struct ufs_dir_entry *old_de;
int err = -ENOENT;
- vfs_dq_init(old_dir);
- vfs_dq_init(new_dir);
+ dquot_initialize(old_dir);
+ dquot_initialize(new_dir);
old_de = ufs_find_entry(old_dir, &old_dentry->d_name, &old_page);
if (!old_de)
diff --git a/fs/ufs/truncate.c b/fs/ufs/truncate.c
index e5ef8a3ec23..d3b6270cb37 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)
attr->ia_size != i_size_read(inode)) {
loff_t old_i_size = inode->i_size;
- vfs_dq_init(inode);
+ dquot_initialize(inode);
error = vmtruncate(inode, attr->ia_size);
if (error)