Merge tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 May 2019 04:28:04 +0000 (21:28 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 May 2019 04:28:04 +0000 (21:28 -0700)
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()

1  2 
fs/crypto/bio.c
fs/crypto/keyinfo.c
fs/dcache.c
fs/ext4/ext4.h
fs/ext4/namei.c
fs/ext4/readpage.c
fs/ext4/super.c
fs/f2fs/super.c
fs/namei.c
fs/ubifs/super.c
include/linux/dcache.h

diff --cc fs/crypto/bio.c
Simple merge
Simple merge
diff --cc fs/dcache.c
Simple merge
diff --cc fs/ext4/ext4.h
Simple merge
diff --cc fs/ext4/namei.c
Simple merge
Simple merge
diff --cc fs/ext4/super.c
index 3681cb737e9d938585e902af4b5a21511c968c2e,5b92054bf8ea0dd37f324401b37833f6bb6d3956..f71b5254a990a48833c63bd36d105c1806e52ab4
@@@ -1111,8 -1107,12 +1111,9 @@@ static int ext4_drop_inode(struct inod
        return drop;
  }
  
 -static void ext4_i_callback(struct rcu_head *head)
 +static void ext4_free_in_core_inode(struct inode *inode)
  {
 -      struct inode *inode = container_of(head, struct inode, i_rcu);
 -
+       fscrypt_free_inode(inode);
 -
        kmem_cache_free(ext4_inode_cachep, EXT4_I(inode));
  }
  
diff --cc fs/f2fs/super.c
index 9924eac7625489bf30f8c0e9f7f68bb57554ec70,11b3a039a18814f19743eb9ee550a7ef026fee34..4c55d2ea9df3679d97325f0f4124e62930ac63d7
@@@ -1000,8 -1000,12 +1000,9 @@@ static void f2fs_dirty_inode(struct ino
        f2fs_inode_dirtied(inode, false);
  }
  
 -static void f2fs_i_callback(struct rcu_head *head)
 +static void f2fs_free_inode(struct inode *inode)
  {
 -      struct inode *inode = container_of(head, struct inode, i_rcu);
 -
+       fscrypt_free_inode(inode);
 -
        kmem_cache_free(f2fs_inode_cachep, F2FS_I(inode));
  }
  
diff --cc fs/namei.c
Simple merge
index c2307c423638c3a670f25ea05125fc538be14092,19fd2109874577648e224d49a1022bf1cd3eeffa..632f02d4d660d73456f5bfa277423da0a5c0cea4
@@@ -272,10 -272,14 +272,13 @@@ static struct inode *ubifs_alloc_inode(
        return &ui->vfs_inode;
  };
  
 -static void ubifs_i_callback(struct rcu_head *head)
 +static void ubifs_free_inode(struct inode *inode)
  {
 -      struct inode *inode = container_of(head, struct inode, i_rcu);
        struct ubifs_inode *ui = ubifs_inode(inode);
        kfree(ui->data);
+       fscrypt_free_inode(inode);
        kmem_cache_free(ubifs_inode_slab, ui);
  }
  
Simple merge