ubifs: Fix UBIFS ro fail due to truncate in the encrypted directory
[linux-2.6-microblaze.git] / fs / ubifs / crypto.c
index c57b46a..3125e76 100644 (file)
@@ -24,6 +24,17 @@ static bool ubifs_crypt_empty_dir(struct inode *inode)
        return ubifs_check_dir_empty(inode) == 0;
 }
 
+/**
+ * ubifs_encrypt - Encrypt data.
+ * @inode: inode which refers to the data node
+ * @dn: data node to encrypt
+ * @in_len: length of data to be compressed
+ * @out_len: allocated memory size for the data area of @dn
+ * @block: logical block number of the block
+ *
+ * This function encrypt a possibly-compressed data in the data node.
+ * The encrypted data length will store in @out_len.
+ */
 int ubifs_encrypt(const struct inode *inode, struct ubifs_data_node *dn,
                  unsigned int in_len, unsigned int *out_len, int block)
 {