]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ocfs2/ocfs2_lockid.h
hwmon: (lm90) Fix handling of hysteresis value
[linux-2.6-omap-h63xx.git] / fs / ocfs2 / ocfs2_lockid.h
index 4d5d5655c185085c9e259b6669bcd35cd29d3068..82c200f7a8f1e327b34b065770c6758892ea70ba 100644 (file)
@@ -44,6 +44,8 @@ enum ocfs2_lock_type {
        OCFS2_LOCK_TYPE_RENAME,
        OCFS2_LOCK_TYPE_RW,
        OCFS2_LOCK_TYPE_DENTRY,
+       OCFS2_LOCK_TYPE_OPEN,
+       OCFS2_LOCK_TYPE_FLOCK,
        OCFS2_NUM_LOCK_TYPES
 };
 
@@ -69,6 +71,12 @@ static inline char ocfs2_lock_type_char(enum ocfs2_lock_type type)
                case OCFS2_LOCK_TYPE_DENTRY:
                        c = 'N';
                        break;
+               case OCFS2_LOCK_TYPE_OPEN:
+                       c = 'O';
+                       break;
+               case OCFS2_LOCK_TYPE_FLOCK:
+                       c = 'F';
+                       break;
                default:
                        c = '\0';
        }
@@ -85,12 +93,14 @@ static char *ocfs2_lock_type_strings[] = {
         * important job it does, anyway. */
        [OCFS2_LOCK_TYPE_RW] = "Write/Read",
        [OCFS2_LOCK_TYPE_DENTRY] = "Dentry",
+       [OCFS2_LOCK_TYPE_OPEN] = "Open",
+       [OCFS2_LOCK_TYPE_FLOCK] = "Flock",
 };
 
 static inline const char *ocfs2_lock_type_string(enum ocfs2_lock_type type)
 {
 #ifdef __KERNEL__
-       mlog_bug_on_msg(type >= OCFS2_NUM_LOCK_TYPES, "%d\n", type);
+       BUG_ON(type >= OCFS2_NUM_LOCK_TYPES);
 #endif
        return ocfs2_lock_type_strings[type];
 }