summaryrefslogtreecommitdiffstats
path: root/fs/ubifs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-05-08 00:28:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-08 00:28:04 -0400
commita9fbcd6728837268784439ad0b02ede2c024c516 (patch)
tree2a58af9a6f7573617ab482aea0998389d8b956af /fs/ubifs
parent5abe37954e9a315c35c9490f78d55f307c3c636b (diff)
parent2c58d548f5706d085c4b009f6abb945220460632 (diff)
Merge tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt
Pull fscrypt updates from Ted Ts'o: "Clean up fscrypt's dcache revalidation support, and other miscellaneous cleanups" * tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: fscrypt: cache decrypted symlink target in ->i_link vfs: use READ_ONCE() to access ->i_link fscrypt: fix race where ->lookup() marks plaintext dentry as ciphertext fscrypt: only set dentry_operations on ciphertext dentries fs, fscrypt: clear DCACHE_ENCRYPTED_NAME when unaliasing directory fscrypt: fix race allowing rename() and link() of ciphertext dentries fscrypt: clean up and improve dentry revalidation fscrypt: use READ_ONCE() to access ->i_crypt_info fscrypt: remove WARN_ON_ONCE() when decryption fails fscrypt: drop inode argument from fscrypt_get_ctx()
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/dir.c8
-rw-r--r--fs/ubifs/super.c3
2 files changed, 6 insertions, 5 deletions
diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
index 5767b373a8ff..b73de6d04fa3 100644
--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -220,11 +220,9 @@ static struct dentry *ubifs_lookup(struct inode *dir, struct dentry *dentry,
220 220
221 dbg_gen("'%pd' in dir ino %lu", dentry, dir->i_ino); 221 dbg_gen("'%pd' in dir ino %lu", dentry, dir->i_ino);
222 222
223 err = fscrypt_prepare_lookup(dir, dentry, flags); 223 err = fscrypt_prepare_lookup(dir, dentry, &nm);
224 if (err) 224 if (err == -ENOENT)
225 return ERR_PTR(err); 225 return d_splice_alias(NULL, dentry);
226
227 err = fscrypt_setup_filename(dir, &dentry->d_name, 1, &nm);
228 if (err) 226 if (err)
229 return ERR_PTR(err); 227 return ERR_PTR(err);
230 228
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index c2307c423638..632f02d4d660 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -275,7 +275,10 @@ static struct inode *ubifs_alloc_inode(struct super_block *sb)
275static void ubifs_free_inode(struct inode *inode) 275static void ubifs_free_inode(struct inode *inode)
276{ 276{
277 struct ubifs_inode *ui = ubifs_inode(inode); 277 struct ubifs_inode *ui = ubifs_inode(inode);
278
278 kfree(ui->data); 279 kfree(ui->data);
280 fscrypt_free_inode(inode);
281
279 kmem_cache_free(ubifs_inode_slab, ui); 282 kmem_cache_free(ubifs_inode_slab, ui);
280} 283}
281 284