JFFS2: avoid using C++ keyword `new' in userspace-visible header
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 2 Feb 2010 22:43:10 +0000 (14:43 -0800)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 25 Feb 2010 12:51:41 +0000 (12:51 +0000)
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=14995

Reported-by: R. Diez <rdiezmail-kernelbugzilla@yahoo.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
fs/jffs2/fs.c
fs/jffs2/nodelist.h
include/linux/jffs2.h

index 3451a81b21428dc1e8b2ed8bf5c9e2704eb0a517..86e0821fc989303d6ccd297e74c18606d45db3ba 100644 (file)
@@ -313,8 +313,8 @@ struct inode *jffs2_iget(struct super_block *sb, unsigned long ino)
        case S_IFBLK:
        case S_IFCHR:
                /* Read the device numbers from the media */
-               if (f->metadata->size != sizeof(jdev.old) &&
-                   f->metadata->size != sizeof(jdev.new)) {
+               if (f->metadata->size != sizeof(jdev.old_id) &&
+                   f->metadata->size != sizeof(jdev.new_id)) {
                        printk(KERN_NOTICE "Device node has strange size %d\n", f->metadata->size);
                        goto error_io;
                }
@@ -325,10 +325,10 @@ struct inode *jffs2_iget(struct super_block *sb, unsigned long ino)
                        printk(KERN_NOTICE "Read device numbers for inode %lu failed\n", (unsigned long)inode->i_ino);
                        goto error;
                }
-               if (f->metadata->size == sizeof(jdev.old))
-                       rdev = old_decode_dev(je16_to_cpu(jdev.old));
+               if (f->metadata->size == sizeof(jdev.old_id))
+                       rdev = old_decode_dev(je16_to_cpu(jdev.old_id));
                else
-                       rdev = new_decode_dev(je32_to_cpu(jdev.new));
+                       rdev = new_decode_dev(je32_to_cpu(jdev.new_id));
 
        case S_IFSOCK:
        case S_IFIFO:
index 507ed6ec1847cfdf7d3ae0377816228f249f42a0..36d7a849ee2cf91f97ab18c036f0d378358a1929 100644 (file)
@@ -312,11 +312,11 @@ static inline int jffs2_blocks_use_vmalloc(struct jffs2_sb_info *c)
 static inline int jffs2_encode_dev(union jffs2_device_node *jdev, dev_t rdev)
 {
        if (old_valid_dev(rdev)) {
-               jdev->old = cpu_to_je16(old_encode_dev(rdev));
-               return sizeof(jdev->old);
+               jdev->old_id = cpu_to_je16(old_encode_dev(rdev));
+               return sizeof(jdev->old_id);
        } else {
-               jdev->new = cpu_to_je32(new_encode_dev(rdev));
-               return sizeof(jdev->new);
+               jdev->new_id = cpu_to_je32(new_encode_dev(rdev));
+               return sizeof(jdev->new_id);
        }
 }
 
index 2b32d638147d5f4bdc3bf77ae8f46e4b2390bfcf..0874ab59ffefbc16858fdc4da4564147a2033bfd 100644 (file)
@@ -215,8 +215,8 @@ union jffs2_node_union
 
 /* Data payload for device nodes. */
 union jffs2_device_node {
-       jint16_t old;
-       jint32_t new;
+       jint16_t old_id;
+       jint32_t new_id;
 };
 
 #endif /* __LINUX_JFFS2_H__ */