]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[GFS2] use list_for_each_entry instead
authorDenis Cheng <crquan@gmail.com>
Sat, 11 Aug 2007 02:27:07 +0000 (10:27 +0800)
committerSteven Whitehouse <swhiteho@redhat.com>
Wed, 10 Oct 2007 07:55:15 +0000 (08:55 +0100)
Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/ops_fstype.c

index f0bcaa25737c4198004076ac5b3bb9ad0f9a9636..32b2859a89a57fbf2899f2105413deeb1e4dd8dd 100644 (file)
@@ -808,7 +808,6 @@ static struct super_block* get_gfs2_sb(const char *dev_name)
        struct nameidata nd;
        struct file_system_type *fstype;
        struct super_block *sb = NULL, *s;
-       struct list_head *l;
        int error;
 
        error = path_lookup(dev_name, LOOKUP_FOLLOW, &nd);
@@ -820,8 +819,7 @@ static struct super_block* get_gfs2_sb(const char *dev_name)
        error = vfs_getattr(nd.mnt, nd.dentry, &stat);
 
        fstype = get_fs_type("gfs2");
-       list_for_each(l, &fstype->fs_supers) {
-               s = list_entry(l, struct super_block, s_instances);
+       list_for_each_entry(s, &fstype->fs_supers, s_instances) {
                if ((S_ISBLK(stat.mode) && s->s_dev == stat.rdev) ||
                    (S_ISDIR(stat.mode) && s == nd.dentry->d_inode->i_sb)) {
                        sb = s;