]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/ubifs/key.h
Merge branch 'for-2.6.37' of git://linux-nfs.org/~bfields/linux
[net-next-2.6.git] / fs / ubifs / key.h
index 0f530c684f0ba13c99c1424c6614d54f0f3ae23b..92a8491a8f8c2da7fa61b9e870cc7a75d1ea8263 100644 (file)
@@ -305,6 +305,20 @@ static inline void trun_key_init(const struct ubifs_info *c,
        key->u32[1] = UBIFS_TRUN_KEY << UBIFS_S_KEY_BLOCK_BITS;
 }
 
+/**
+ * invalid_key_init - initialize invalid node key.
+ * @c: UBIFS file-system description object
+ * @key: key to initialize
+ *
+ * This is a helper function which marks a @key object as invalid.
+ */
+static inline void invalid_key_init(const struct ubifs_info *c,
+                                   union ubifs_key *key)
+{
+       key->u32[0] = 0xDEADBEAF;
+       key->u32[1] = UBIFS_INVALID_KEY;
+}
+
 /**
  * key_type - get key type.
  * @c: UBIFS file-system description object