if (!error) {
                fsnotify_change(dentry, ia_valid);
                ima_inode_post_setattr(idmap, dentry, ia_valid);
-               evm_inode_post_setattr(dentry, ia_valid);
+               evm_inode_post_setattr(idmap, dentry, ia_valid);
        }
 
        return error;
 
                                             struct integrity_iint_cache *iint);
 extern int evm_inode_setattr(struct mnt_idmap *idmap,
                             struct dentry *dentry, struct iattr *attr);
-extern void evm_inode_post_setattr(struct dentry *dentry, int ia_valid);
+extern void evm_inode_post_setattr(struct mnt_idmap *idmap,
+                                  struct dentry *dentry, int ia_valid);
 extern int evm_inode_setxattr(struct mnt_idmap *idmap,
                              struct dentry *dentry, const char *name,
                              const void *value, size_t size);
        return 0;
 }
 
-static inline void evm_inode_post_setattr(struct dentry *dentry, int ia_valid)
+static inline void evm_inode_post_setattr(struct mnt_idmap *idmap,
+                                         struct dentry *dentry, int ia_valid)
 {
        return;
 }
 
 
 /**
  * evm_inode_post_setattr - update 'security.evm' after modifying metadata
+ * @idmap: idmap of the idmapped mount
  * @dentry: pointer to the affected dentry
  * @ia_valid: for the UID and GID status
  *
  * This function is called from notify_change(), which expects the caller
  * to lock the inode's i_mutex.
  */
-void evm_inode_post_setattr(struct dentry *dentry, int ia_valid)
+void evm_inode_post_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
+                           int ia_valid)
 {
        if (!evm_revalidate_status(NULL))
                return;