From: Jaegeuk Kim Date: Tue, 7 Mar 2017 19:22:45 +0000 (-0800) Subject: f2fs: don't allow to get pino when filename is encrypted X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4f1bca9f0db3dc82297092eafdb95f58ecef5d7a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git f2fs: don't allow to get pino when filename is encrypted After renaming an encrypted file, we have no way to get its encrypted filename from its dentry. Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 6d120a5b8f4b..3212dfa1a50e 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -110,6 +110,9 @@ static int get_parent_ino(struct inode *inode, nid_t *pino) { struct dentry *dentry; + if (file_enc_name(inode)) + return 0; + inode = igrab(inode); dentry = d_find_any_alias(inode); iput(inode);