]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/ubifs/key.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for...
[karo-tx-linux.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