]> git.hungrycats.org Git - linux/commitdiff
[PATCH] list_for_each is fs/
authorDave Jones <davej@suse.de>
Thu, 4 Apr 2002 06:23:13 +0000 (22:23 -0800)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Thu, 4 Apr 2002 06:23:13 +0000 (22:23 -0800)
From the kernel janitor folks

fs/binfmt_misc.c
fs/block_dev.c
fs/char_dev.c
fs/fat/inode.c
fs/file_table.c
fs/nfsd/nfsfh.c
fs/proc/generic.c
fs/reiserfs/inode.c

index 693c9672372fe8c2d10ca30cc0712b291803e15c..c5877b4322842fc45aa34ab10ba713c587d17971 100644 (file)
@@ -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;
index 30ec91b830d44e498a211a1f0a9873810b6a1e8b..af9264109098e05e77d0589bca92a50d3e4786b5 100644 (file)
@@ -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;
index e5043598f742752892d36a884e154726e0637504..f86638e5f50710b518fbb691e66dfe128084380e 100644 (file)
@@ -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;
index b5f9f42273958145e38bf50a036f811b2ca2c46a..a8ce1db70a2c91e96639ee67a6f45b4de0874b73 100644 (file)
@@ -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);
index d9e8a5b3d2eb40bb35aface39d16f36d0e29428c..c7068992386bbdac3524cce5fcdb52357f762bc8 100644 (file)
@@ -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;
 
index be06a4014039dc211cd6f3668f6cb267b060e363..01e2d4ed3b4ebf7702bb6af62320c32b5a49d657 100644 (file)
@@ -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);
index 09ee4e16c6578e88f8c3f21e0c5ddc97a939f19c..f492f2c581c5a79624bd83cf0f96d73fb53ad467 100644 (file)
@@ -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;
index b37599235c7ddc70d4a62ddc717b388e0495b6d7..704f804fc457322f46d6645f0d3360668cb87962 100644 (file)
@@ -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);