diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-03-07 11:22:45 -0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-03-21 16:52:16 -0400 |
commit | 4f1bca9f0db3dc82297092eafdb95f58ecef5d7a (patch) | |
tree | 0d820fe83d3892826adb34bca4a97d647b36426a /fs | |
parent | 8c1b3c0fb6d633d09507ab2dbb23d384941a850a (diff) | |
download | linux-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.c | 3 |
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); |