summaryrefslogtreecommitdiffstats
path: root/fs/dquot.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pretzel.yyz.us>2005-06-26 18:06:06 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-06-26 18:06:06 -0400
commitaef7b83c92dd0b7e994805440655d1d64147287b (patch)
tree981f373358c1988e061625e8f272013065cb086f /fs/dquot.c
parentb1fc5505e0dbcc3fd7c75bfe6bee39ec50080963 (diff)
parent8678887e7fb43cd6c9be6c9807b05e77848e0920 (diff)
downloadop-kernel-dev-aef7b83c92dd0b7e994805440655d1d64147287b.zip
op-kernel-dev-aef7b83c92dd0b7e994805440655d1d64147287b.tar.gz
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'fs/dquot.c')
-rw-r--r--fs/dquot.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/fs/dquot.c b/fs/dquot.c
index 3995ce7..b973233 100644
--- a/fs/dquot.c
+++ b/fs/dquot.c
@@ -409,13 +409,10 @@ out_dqlock:
* for this sb+type at all. */
static void invalidate_dquots(struct super_block *sb, int type)
{
- struct dquot *dquot;
- struct list_head *head;
+ struct dquot *dquot, *tmp;
spin_lock(&dq_list_lock);
- for (head = inuse_list.next; head != &inuse_list;) {
- dquot = list_entry(head, struct dquot, dq_inuse);
- head = head->next;
+ list_for_each_entry_safe(dquot, tmp, &inuse_list, dq_inuse) {
if (dquot->dq_sb != sb)
continue;
if (dquot->dq_type != type)
@@ -1519,14 +1516,22 @@ out_path:
* This function is used when filesystem needs to initialize quotas
* during mount time.
*/
-int vfs_quota_on_mount(int type, int format_id, struct dentry *dentry)
+int vfs_quota_on_mount(struct super_block *sb, char *qf_name,
+ int format_id, int type)
{
+ struct dentry *dentry;
int error;
+ dentry = lookup_one_len(qf_name, sb->s_root, strlen(qf_name));
+ if (IS_ERR(dentry))
+ return PTR_ERR(dentry);
+
error = security_quota_on(dentry);
- if (error)
- return error;
- return vfs_quota_on_inode(dentry->d_inode, type, format_id);
+ if (!error)
+ error = vfs_quota_on_inode(dentry->d_inode, type, format_id);
+
+ dput(dentry);
+ return error;
}
/* Generic routine for getting common part of quota structure */
OpenPOWER on IntegriCloud