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>
This commit is contained in:
Jaegeuk Kim 2017-03-07 11:22:45 -08:00
parent 8c1b3c0fb6
commit 4f1bca9f0d
1 changed files with 3 additions and 0 deletions

View File

@ -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);