Commit 6037891c authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] cleanup list usage in dquot

From the kernel janitor folks
parent 13f84f82
...@@ -337,7 +337,7 @@ static void invalidate_dquots(struct super_block *sb, short type) ...@@ -337,7 +337,7 @@ static void invalidate_dquots(struct super_block *sb, short type)
struct list_head *head; struct list_head *head;
restart: restart:
for (head = inuse_list.next; head != &inuse_list; head = head->next) { list_for_each(head, &inuse_list) {
dquot = list_entry(head, struct dquot, dq_inuse); dquot = list_entry(head, struct dquot, dq_inuse);
if (dquot->dq_sb != sb) if (dquot->dq_sb != sb)
continue; continue;
...@@ -367,7 +367,7 @@ int sync_dquots(struct super_block *sb, short type) ...@@ -367,7 +367,7 @@ int sync_dquots(struct super_block *sb, short type)
lock_kernel(); lock_kernel();
restart: restart:
for (head = inuse_list.next; head != &inuse_list; head = head->next) { list_for_each(head, &inuse_list) {
dquot = list_entry(head, struct dquot, dq_inuse); dquot = list_entry(head, struct dquot, dq_inuse);
if (sb && dquot->dq_sb != sb) if (sb && dquot->dq_sb != sb)
continue; continue;
...@@ -579,7 +579,7 @@ static void add_dquot_ref(struct super_block *sb, short type) ...@@ -579,7 +579,7 @@ static void add_dquot_ref(struct super_block *sb, short type)
restart: restart:
file_list_lock(); file_list_lock();
for (p = sb->s_files.next; p != &sb->s_files; p = p->next) { list_for_each(p, &sb->s_files) {
struct file *filp = list_entry(p, struct file, f_list); struct file *filp = list_entry(p, struct file, f_list);
struct inode *inode = filp->f_dentry->d_inode; struct inode *inode = filp->f_dentry->d_inode;
if (filp->f_mode & FMODE_WRITE && dqinit_needed(inode, type)) { if (filp->f_mode & FMODE_WRITE && dqinit_needed(inode, type)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment