diff options
Diffstat (limited to 'fs/dquot.c')
-rw-r--r-- | fs/dquot.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/fs/dquot.c b/fs/dquot.c index 3995ce7907cc..b9732335bcdc 100644 --- a/fs/dquot.c +++ b/fs/dquot.c | |||
@@ -409,13 +409,10 @@ out_dqlock: | |||
409 | * for this sb+type at all. */ | 409 | * for this sb+type at all. */ |
410 | static void invalidate_dquots(struct super_block *sb, int type) | 410 | static void invalidate_dquots(struct super_block *sb, int type) |
411 | { | 411 | { |
412 | struct dquot *dquot; | 412 | struct dquot *dquot, *tmp; |
413 | struct list_head *head; | ||
414 | 413 | ||
415 | spin_lock(&dq_list_lock); | 414 | spin_lock(&dq_list_lock); |
416 | for (head = inuse_list.next; head != &inuse_list;) { | 415 | list_for_each_entry_safe(dquot, tmp, &inuse_list, dq_inuse) { |
417 | dquot = list_entry(head, struct dquot, dq_inuse); | ||
418 | head = head->next; | ||
419 | if (dquot->dq_sb != sb) | 416 | if (dquot->dq_sb != sb) |
420 | continue; | 417 | continue; |
421 | if (dquot->dq_type != type) | 418 | if (dquot->dq_type != type) |
@@ -1519,14 +1516,22 @@ out_path: | |||
1519 | * This function is used when filesystem needs to initialize quotas | 1516 | * This function is used when filesystem needs to initialize quotas |
1520 | * during mount time. | 1517 | * during mount time. |
1521 | */ | 1518 | */ |
1522 | int vfs_quota_on_mount(int type, int format_id, struct dentry *dentry) | 1519 | int vfs_quota_on_mount(struct super_block *sb, char *qf_name, |
1520 | int format_id, int type) | ||
1523 | { | 1521 | { |
1522 | struct dentry *dentry; | ||
1524 | int error; | 1523 | int error; |
1525 | 1524 | ||
1525 | dentry = lookup_one_len(qf_name, sb->s_root, strlen(qf_name)); | ||
1526 | if (IS_ERR(dentry)) | ||
1527 | return PTR_ERR(dentry); | ||
1528 | |||
1526 | error = security_quota_on(dentry); | 1529 | error = security_quota_on(dentry); |
1527 | if (error) | 1530 | if (!error) |
1528 | return error; | 1531 | error = vfs_quota_on_inode(dentry->d_inode, type, format_id); |
1529 | return vfs_quota_on_inode(dentry->d_inode, type, format_id); | 1532 | |
1533 | dput(dentry); | ||
1534 | return error; | ||
1530 | } | 1535 | } |
1531 | 1536 | ||
1532 | /* Generic routine for getting common part of quota structure */ | 1537 | /* Generic routine for getting common part of quota structure */ |