]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/ubifs/crypto.c
ubifs: Massage assert in ubifs_xattr_set() wrt. init_xattrs
[karo-tx-linux.git] / fs / ubifs / crypto.c
index 382ed428cfd2167cc8c57c934e06ab29a92ceb6c..114ba455bac3d0ee11208c5af44749d5df3864f2 100644 (file)
@@ -9,8 +9,13 @@ static int ubifs_crypt_get_context(struct inode *inode, void *ctx, size_t len)
 static int ubifs_crypt_set_context(struct inode *inode, const void *ctx,
                                   size_t len, void *fs_data)
 {
+       /*
+        * Creating an encryption context is done unlocked since we
+        * operate on a new inode which is not visible to other users
+        * at this point. So, no need to check whether inode is locked.
+        */
        return ubifs_xattr_set(inode, UBIFS_XATTR_NAME_ENCRYPTION_CONTEXT,
-                              ctx, len, 0);
+                              ctx, len, 0, false);
 }
 
 static bool ubifs_crypt_empty_dir(struct inode *inode)