ocfs2: char is not always signed
authorMilton Miller <miltonm@bga.com>
Thu, 18 Nov 2010 04:20:11 +0000 (22:20 -0600)
committerJoel Becker <joel.becker@oracle.com>
Thu, 18 Nov 2010 22:10:56 +0000 (14:10 -0800)
Commit 1c66b360fe262 (Change some lock status member in ocfs2_lock_res
to char.)  states that these fields need to be signed due to comparision
to -1, but only changed the type from unsigned char to char.   However, it
is a compiler option if char is a signed or unsigned type.  Change these
fields to signed char so the code will work with all compilers.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/ocfs2.h

index 1efea3615589ae1d5c30509d73cd03c09ccc973e..70dd3b1798f136130f4ef5ab5198012c2e3bc82d 100644 (file)
@@ -159,9 +159,9 @@ struct ocfs2_lock_res {
        char                     l_name[OCFS2_LOCK_ID_MAX_LEN];
        unsigned int             l_ro_holders;
        unsigned int             l_ex_holders;
-       char                     l_level;
-       char                     l_requested;
-       char                     l_blocking;
+       signed char              l_level;
+       signed char              l_requested;
+       signed char              l_blocking;
 
        /* Data packed - type enum ocfs2_lock_type */
        unsigned char            l_type;