aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf
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/udf
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/udf')
-rw-r--r--fs/udf/file.c2
-rw-r--r--fs/udf/ialloc.c2
-rw-r--r--fs/udf/inode.c2
-rw-r--r--fs/udf/namei.c18
4 files changed, 12 insertions, 12 deletions
diff --git a/fs/udf/file.c b/fs/udf/file.c
index 013fa44d9a5..1eb06774ed9 100644
--- a/fs/udf/file.c
+++ b/fs/udf/file.c
@@ -228,7 +228,7 @@ static int udf_setattr(struct dentry *dentry, struct iattr *iattr)
228 return error; 228 return error;
229 229
230 if (iattr->ia_valid & ATTR_SIZE) 230 if (iattr->ia_valid & ATTR_SIZE)
231 vfs_dq_init(inode); 231 dquot_initialize(inode);
232 232
233 if ((iattr->ia_valid & ATTR_UID && iattr->ia_uid != inode->i_uid) || 233 if ((iattr->ia_valid & ATTR_UID && iattr->ia_uid != inode->i_uid) ||
234 (iattr->ia_valid & ATTR_GID && iattr->ia_gid != inode->i_gid)) { 234 (iattr->ia_valid & ATTR_GID && iattr->ia_gid != inode->i_gid)) {
diff --git a/fs/udf/ialloc.c b/fs/udf/ialloc.c
index 15c6e992e58..fb68c9cd0c3 100644
--- a/fs/udf/ialloc.c
+++ b/fs/udf/ialloc.c
@@ -153,7 +153,7 @@ struct inode *udf_new_inode(struct inode *dir, int mode, int *err)
153 insert_inode_hash(inode); 153 insert_inode_hash(inode);
154 mark_inode_dirty(inode); 154 mark_inode_dirty(inode);
155 155
156 vfs_dq_init(inode); 156 dquot_initialize(inode);
157 ret = dquot_alloc_inode(inode); 157 ret = dquot_alloc_inode(inode);
158 if (ret) { 158 if (ret) {
159 dquot_drop(inode); 159 dquot_drop(inode);
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index f1952026840..c7da1a32b36 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -72,7 +72,7 @@ static int udf_get_block(struct inode *, sector_t, struct buffer_head *, int);
72void udf_delete_inode(struct inode *inode) 72void udf_delete_inode(struct inode *inode)
73{ 73{
74 if (!is_bad_inode(inode)) 74 if (!is_bad_inode(inode))
75 vfs_dq_init(inode); 75 dquot_initialize(inode);
76 76
77 truncate_inode_pages(&inode->i_data, 0); 77 truncate_inode_pages(&inode->i_data, 0);
78 78
diff --git a/fs/udf/namei.c b/fs/udf/namei.c
index e360c3fc4ae..96757e3e3e0 100644
--- a/fs/udf/namei.c
+++ b/fs/udf/namei.c
@@ -563,7 +563,7 @@ static int udf_create(struct inode *dir, struct dentry *dentry, int mode,
563 int err; 563 int err;
564 struct udf_inode_info *iinfo; 564 struct udf_inode_info *iinfo;
565 565
566 vfs_dq_init(dir); 566 dquot_initialize(dir);
567 567
568 lock_kernel(); 568 lock_kernel();
569 inode = udf_new_inode(dir, mode, &err); 569 inode = udf_new_inode(dir, mode, &err);
@@ -618,7 +618,7 @@ static int udf_mknod(struct inode *dir, struct dentry *dentry, int mode,
618 if (!old_valid_dev(rdev)) 618 if (!old_valid_dev(rdev))
619 return -EINVAL; 619 return -EINVAL;
620 620
621 vfs_dq_init(dir); 621 dquot_initialize(dir);
622 622
623 lock_kernel(); 623 lock_kernel();
624 err = -EIO; 624 err = -EIO;
@@ -666,7 +666,7 @@ static int udf_mkdir(struct inode *dir, struct dentry *dentry, int mode)
666 struct udf_inode_info *dinfo = UDF_I(dir); 666 struct udf_inode_info *dinfo = UDF_I(dir);
667 struct udf_inode_info *iinfo; 667 struct udf_inode_info *iinfo;
668 668
669 vfs_dq_init(dir); 669 dquot_initialize(dir);
670 670
671 lock_kernel(); 671 lock_kernel();
672 err = -EMLINK; 672 err = -EMLINK;
@@ -805,7 +805,7 @@ static int udf_rmdir(struct inode *dir, struct dentry *dentry)
805 struct fileIdentDesc *fi, cfi; 805 struct fileIdentDesc *fi, cfi;
806 struct kernel_lb_addr tloc; 806 struct kernel_lb_addr tloc;
807 807
808 vfs_dq_init(dir); 808 dquot_initialize(dir);
809 809
810 retval = -ENOENT; 810 retval = -ENOENT;
811 lock_kernel(); 811 lock_kernel();
@@ -853,7 +853,7 @@ static int udf_unlink(struct inode *dir, struct dentry *dentry)
853 struct fileIdentDesc cfi; 853 struct fileIdentDesc cfi;
854 struct kernel_lb_addr tloc; 854 struct kernel_lb_addr tloc;
855 855
856 vfs_dq_init(dir); 856 dquot_initialize(dir);
857 857
858 retval = -ENOENT; 858 retval = -ENOENT;
859 lock_kernel(); 859 lock_kernel();
@@ -909,7 +909,7 @@ static int udf_symlink(struct inode *dir, struct dentry *dentry,
909 struct buffer_head *bh; 909 struct buffer_head *bh;
910 struct udf_inode_info *iinfo; 910 struct udf_inode_info *iinfo;
911 911
912 vfs_dq_init(dir); 912 dquot_initialize(dir);
913 913
914 lock_kernel(); 914 lock_kernel();
915 inode = udf_new_inode(dir, S_IFLNK, &err); 915 inode = udf_new_inode(dir, S_IFLNK, &err);
@@ -1081,7 +1081,7 @@ static int udf_link(struct dentry *old_dentry, struct inode *dir,
1081 int err; 1081 int err;
1082 struct buffer_head *bh; 1082 struct buffer_head *bh;
1083 1083
1084 vfs_dq_init(dir); 1084 dquot_initialize(dir);
1085 1085
1086 lock_kernel(); 1086 lock_kernel();
1087 if (inode->i_nlink >= (256 << sizeof(inode->i_nlink)) - 1) { 1087 if (inode->i_nlink >= (256 << sizeof(inode->i_nlink)) - 1) {
@@ -1145,8 +1145,8 @@ static int udf_rename(struct inode *old_dir, struct dentry *old_dentry,
1145 struct kernel_lb_addr tloc; 1145 struct kernel_lb_addr tloc;
1146 struct udf_inode_info *old_iinfo = UDF_I(old_inode); 1146 struct udf_inode_info *old_iinfo = UDF_I(old_inode);
1147 1147
1148 vfs_dq_init(old_dir); 1148 dquot_initialize(old_dir);
1149 vfs_dq_init(new_dir); 1149 dquot_initialize(new_dir);
1150 1150
1151 lock_kernel(); 1151 lock_kernel();
1152 ofi = udf_find_entry(old_dir, &old_dentry->d_name, &ofibh, &ocfi); 1152 ofi = udf_find_entry(old_dir, &old_dentry->d_name, &ofibh, &ocfi);