diff mbox

ubifs: Don't encrypt special files on creation

Message ID 20170517113616.61499-1-david@sigma-star.at (mailing list archive)
State Not Applicable
Headers show

Commit Message

David Gstir May 17, 2017, 11:36 a.m. UTC
When a new inode is created, we check if the containing folder has a encryption
policy set and inherit that. This should however only be done for regular
files, links and subdirectories. Not for sockes fifos etc.

Fixes: d475a507457b ("ubifs: Add skeleton for fscrypto")
Cc: stable@vger.kernel.org
Signed-off-by: David Gstir <david@sigma-star.at>
 fs/ubifs/dir.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox


diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
index 566079d9b402..c67f6a3a606c 100644
--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -143,6 +143,7 @@  struct inode *ubifs_new_inode(struct ubifs_info *c, struct inode *dir,
 	case S_IFBLK:
 	case S_IFCHR:
 		inode->i_op  = &ubifs_file_inode_operations;
+		encrypted = false;