summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Jones <davej@suse.de>2002-04-03 22:23:13 -0800
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-04-03 22:23:13 -0800
commit3cbdf133626a920f80db1e57552d39b43da48ddd (patch)
tree17352a4c00e344abd00d026561dfd2abb3930bd0
parent6037891cece4d83345beecd9caceaa5f9b3ade72 (diff)
[PATCH] list_for_each is fs/
From the kernel janitor folks
-rw-r--r--fs/binfmt_misc.c2
-rw-r--r--fs/block_dev.c2
-rw-r--r--fs/char_dev.c2
-rw-r--r--fs/fat/inode.c2
-rw-r--r--fs/file_table.c2
-rw-r--r--fs/nfsd/nfsfh.c2
-rw-r--r--fs/proc/generic.c2
-rw-r--r--fs/reiserfs/inode.c2
8 files changed, 8 insertions, 8 deletions
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index 693c9672372f..c5877b432284 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -62,7 +62,7 @@ static Node *check_file(struct linux_binprm *bprm)
char *p = strrchr(bprm->filename, '.');
struct list_head *l;
- for (l = entries.next; l != &entries; l = l->next) {
+ list_for_each(l, &entries) {
Node *e = list_entry(l, Node, list);
char *s;
int j;
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 30ec91b830d4..af9264109098 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -337,7 +337,7 @@ static struct block_device *bdfind(dev_t dev, struct list_head *head)
{
struct list_head *p;
struct block_device *bdev;
- for (p=head->next; p!=head; p=p->next) {
+ list_for_each(p, head) {
bdev = list_entry(p, struct block_device, bd_hash);
if (bdev->bd_dev != dev)
continue;
diff --git a/fs/char_dev.c b/fs/char_dev.c
index e5043598f742..f86638e5f507 100644
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -67,7 +67,7 @@ static struct char_device *cdfind(dev_t dev, struct list_head *head)
{
struct list_head *p;
struct char_device *cdev;
- for (p=head->next; p!=head; p=p->next) {
+ list_for_each(p, head) {
cdev = list_entry(p, struct char_device, hash);
if (cdev->dev != dev)
continue;
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index b5f9f4227395..a8ce1db70a2c 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -486,7 +486,7 @@ struct dentry *fat_fh_to_dentry(struct super_block *sb, __u32 *fh,
* code.
*/
spin_lock(&dcache_lock);
- for (lp = inode->i_dentry.next; lp != &inode->i_dentry ; lp=lp->next) {
+ list_for_each(lp, &inode->i_dentry) {
result = list_entry(lp,struct dentry, d_alias);
if (! (result->d_flags & DCACHE_NFSD_DISCONNECTED)) {
dget_locked(result);
diff --git a/fs/file_table.c b/fs/file_table.c
index d9e8a5b3d2eb..c7068992386b 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -169,7 +169,7 @@ int fs_may_remount_ro(struct super_block *sb)
/* Check that no files are currently opened for writing. */
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 *file = list_entry(p, struct file, f_list);
struct inode *inode = file->f_dentry->d_inode;
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index be06a4014039..01e2d4ed3b4e 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -160,7 +160,7 @@ static struct dentry *nfsd_iget(struct super_block *sb, unsigned long ino, __u32
* If possible, get a well-connected one
*/
spin_lock(&dcache_lock);
- for (lp = inode->i_dentry.next; lp != &inode->i_dentry ; lp=lp->next) {
+ list_for_each(lp, &inode->i_dentry) {
result = list_entry(lp,struct dentry, d_alias);
if (! (result->d_flags & DCACHE_NFSD_DISCONNECTED)) {
dget_locked(result);
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 09ee4e16c657..f492f2c581c5 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -404,7 +404,7 @@ static void proc_kill_inodes(struct proc_dir_entry *de)
* Actually it's a partial revoke().
*/
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 dentry * dentry = filp->f_dentry;
struct inode * inode;
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index b37599235c7d..704f804fc457 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -1289,7 +1289,7 @@ out:
* If possible, get a well-connected one
*/
spin_lock(&dcache_lock);
- for (lp = inode->i_dentry.next; lp != &inode->i_dentry ; lp=lp->next) {
+ list_for_each(lp, &inode->i_dentry) {
result = list_entry(lp,struct dentry, d_alias);
if (! (result->d_flags & DCACHE_NFSD_DISCONNECTED)) {
dget_locked(result);