summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2017-03-07 11:22:45 -0800
committerJaegeuk Kim <jaegeuk@kernel.org>2017-03-21 16:52:16 -0400
commit4f1bca9f0db3dc82297092eafdb95f58ecef5d7a (patch)
tree0d820fe83d3892826adb34bca4a97d647b36426a /fs
parent8c1b3c0fb6d633d09507ab2dbb23d384941a850a (diff)
downloadlinux-4f1bca9f0db3dc82297092eafdb95f58ecef5d7a.tar.gz
linux-4f1bca9f0db3dc82297092eafdb95f58ecef5d7a.tar.bz2
linux-4f1bca9f0db3dc82297092eafdb95f58ecef5d7a.zip
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 <jaegeuk@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/file.c3
1 files changed, 3 insertions, 0 deletions
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);